3 ms·
I wrote an implementation of libmagic in Racket a few years ago(https://github.com/jjsimpso/magic https://github.com/jjsimpso/magic). File type identification i
by jjsimpso 3y ago
I wrote an implementation of libmagic in Racket a few years ago(https://github.com/jjsimpso/magic https://github.com/jjsimpso/magic). File type identification is a pretty interesting topic.
As others have noted, libmagic detects many more file types than Magika, but I can see Magika being useful for text files in particular, because anything written by humans doesn't have a rigid format.