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
It appears that
public 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