Hello,
FileMagic is a Ruby binding to the magic(4) library, which you may know better
as the file(1) command. The file command identifies the type of a file using,
among other tests, a test for whether the file begins with a certain magic
number. It supports most of the functionality that libmagic does including:
o Filetype determination by magic number
o Symlink following
o Reading of compressed files
o Examination of block device contents
o MIME strings instead of textual descriptions
o Database consistency checking
o Database file compilation
o Text buffer examination instead of file examination
Anyway, it’s the second binding I’ve written, and I learned a lot.
Check it out,
Travis Whitton whitton@atlantic.net