Unix compress (.Z) files

Heiko Wundram heikowu at ceosg.de
Sat May 8 01:47:18 EDT 2004


Am Samstag, 8. Mai 2004 01:04 schrieb Peter Smith:
> Are there any utilities in Python which can uncompress a file zipped
> on a unix system using "compress"?

Unix "compress" uses a form of the LZW compression codec (same thing as is 
used for GIFs), and because of the patent restrictions UniSys has on this 
codec, it'll be hard to come across a decompressor for this kind of file, if 
not the original Unix tool itself by now (which is symlinked to gzip on my 
workstation installation). As far as I know, Python has no binding to an 
LZW-decompression library (zlib uses something completely different), and so 
you're on your own.

But coding an LZW decompressor is not that hard... ;)

Heiko.




More information about the Python-list mailing list