file/type list/libmagic overhaul
Gravis
filemaillist at adaptivetime.com
Sun Aug 17 20:57:48 EEST 2008
in short:
im proposing a massive update to the file type file as well as change
it's format to something faster.
my story:
in my programming endeavor im dealing with files with no names so
naturally i turned to using a library to do magic numbers/patterns to
identify the types. however, my instinct to use something in the LSB
was sorely met by a rustic and out of date list of file types when i
found it cant even detect PNG images. my alternatives were to use a
desktop specific lib that had a MUCH more complete list of types or
write my own, neither of which are appealing. however, i did notice
that both desktop specific and libmagic are SLOW specifically because of
how they are organized.
my proposal:
1. an online form in which people can submit types to add which would
require occasional updates to the list of course (every 3 months?).
2. change the file type list to a binary format (like some of the
alternatives to libmagic)
3. make the file type list more like a specialized database (sorted by
popularity) for SIGNIFICANTLY faster type lookup times.
4. try to get desktop environments to use libmagic (which they havent
due to it's inadequacy)
other implimentations:
this is how ROX, Gnome and soon(already?) KDE does stores file types:
http://www.termalkristaly.hu/doc/shared-mime-info/shared-mime-info-spec.html/x34.html#AEN214
more info at:
http://www.termalkristaly.hu/doc/shared-mime-info/shared-mime-info-spec.html
because this is in the LSB i think that it should include every file
type under the sun including commercial products, game files and even
ROM formats for emulators. if this is just too much, an official (RFC
documented formats) list and an unofficial DB could be used though i
really hope you would consider having all formats in one.
i'm willing to do all the programming myself but i really want to get it
into the LSB so that once and for all the file type lookup can be
unified for all applications.
thanks for your time,
Gravis
More information about the File
mailing list