Joel Klecker writes:
 > However, I have run across a patch that adds an option that does use magic
 > numbers to guess which compression program to use. The URL was posted on
 > gnu.misc.discuss some months ago, but it is unfortunately not on dejanews.

For things like that, I have developped a utility function which,
among other things, identifies by magic most compressed formats
(ie. .Z, .gz, .bz2, .lzo - I didn't add .bz, but that would be
tricky), can additionnaly do a magic-identification on the compressed
data, and is safe regarding non-seekable files.

It can be found in the console-tools package (see slink - still in
Incoming for now), as function findfile() in libctutils
(/usr/include/lct/utils.h).  Note that I stillconsider this to be in
alpha stage - it has to be made more modular.

-- 
Yann Dirson  <[EMAIL PROTECTED]>      | Stop making M$-Bill richer & richer,
alt-email:     <[EMAIL PROTECTED]>      |     support Debian GNU/Linux:
debian-email:   <[EMAIL PROTECTED]>      |         more powerful, more stable !
http://www.a2points.com/homepage/3475232 | Check <http://www.debian.org/>


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to