Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MimeDetective LearnMimeType reads every other byte of a header #34

Open
pluggles opened this issue Sep 12, 2019 · 0 comments
Open

MimeDetective LearnMimeType reads every other byte of a header #34

pluggles opened this issue Sep 12, 2019 · 0 comments

Comments

@pluggles
Copy link

It appears thatpublic static FileType LearnMimeType(FileInfo first, FileInfo second, string mimeType, int maxHeaderSize = 12, int minMatches = 2, int maxNonMatch = 3) in MimeDetective.cs is checking every other byte for matches in this method and adds the matches to the header for the new file type it returns.

Is this intentional?

Additionally i'm having a hard time figuring out the purpose of this method at all. Is it used to find the common header info of a known filetype/mime extension, or is it used to find the mime type of an unknown file, by comparing it to a known mime type? or something else

@pluggles pluggles changed the title MimeDetective LearnMimeType readys every other byte of a header MimeDetective LearnMimeType reads every other byte of a header Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant