magic
magic copied to clipboard
Why there are no mimetypes in the "MIME" field?
G'day, magic contributors!
I'm trying to write a program that converts cbr's to PDF, and I'd like to ask why there are no MIME types and how could I correctly make a function that checks if a file is RAR-compressed, or Zip-compressed, or TAR-archived etc. Currently, I'm making a quick n' dirty switch-case, but I don't think that's the best way of doing it. I'd like to use MIME types in this switch-case because it seems like a more trustful comparison.
Merci in advance.