Unix compress (.Z) files

Discussion in 'Python' started by Peter Smith, May 8, 2004.

  1. Peter Smith

    Peter Smith Guest

    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.
     
    Peter Smith, May 8, 2004
    #1
    1. Advertising

  2. 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.
     
    Heiko Wundram, May 8, 2004
    #2
    1. Advertising

  3. Peter Smith

    Robin Munn Guest

    Heiko Wundram <> wrote:
    > 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... ;)


    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.

    --
    Robin Munn
     
    Robin Munn, May 10, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?15nXldeg15kg15LXldec15PXkdeo15I=?=

    Do you know good zip (compress files) control?

    =?Utf-8?B?15nXldeg15kg15LXldec15PXkdeo15I=?=, May 23, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    496
    Kevin Spencer
    May 24, 2005
  2. ad
    Replies:
    2
    Views:
    2,994
    Eirik Eldorsen
    Aug 26, 2005
  3. dust

    Compress the code of .aspx files

    dust, Sep 8, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    461
  4. zeke

    How to compress on unix?

    zeke, Jun 15, 2004, in forum: Perl Misc
    Replies:
    5
    Views:
    139
    Tintin
    Jun 16, 2004
  5. Replies:
    5
    Views:
    597
Loading...

Share This Page