Unix compress (.Z) files

P

Peter Smith

Hi:

Are there any utilities in Python which can uncompress a file zipped
on a unix system using "compress"? I tried playing around with zlib
and was not successful. Also I am trying not to use the OS
(os.popen('compress > file.Z','w') call. I am using Python 2.3.3.

If you have the exact syntax that would be great.

Thanks.
 
H

Heiko Wundram

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.
 
R

Robin Munn

Heiko Wundram said:
Am Samstag, 8. Mai 2004 01:04 schrieb Peter Smith:

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... ;)

Didn't that patent expire already?

(Google, Google...) From http://www.unisys.com/about__unisys/lzw --

The U.S. LZW patent expired on June 20, 2003, the counterpart
Canadian patent expires July 7, 2004, the counterpart patents in the
United Kingdom, France, Germany and Italy expire June 18, 2004, and
the Japanese counterpart patents expire June 20, 2004.

The U.S. patent has expired, but you may not be able to distribute an
LZW program worldwide yet. Just wait two months, though, and then you'll
be able to write and distribute a Python module for LZW decompression
without infringing on any patents.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top