in reply to Wanted: perl equivalent of Solaris compress utility

Simple searches yield some info

.z => decompressing tar.Z files, uncompressing a foo.Z file.

http://search.cpan.org/dist/compress%20.z/ => Compress::LZW (but it does not yet support compress(1)'s .Z files!!)

update: Lempel-Ziv site:perlmonks.thepen.com yields LZW Demystified

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

  • Comment on Re: Wanted: perl equivalent of Solaris compress utility

Replies are listed 'Best First'.
Re^2: Wanted: perl equivalent of Solaris compress utility
by rinceWind (Monsignor) on Nov 16, 2004 at 13:35 UTC
    Thanks for the pointers, especially LZW Demystified. I've tried Compress::LZW, and as the documentation says, it does not yet support compress(1)'s .Z files.

    I've also tried compressing a small file and attempting to decode it by hand with no success. Here's a challenge: could someone show how the algorithm decompresses the following:

    /home/test: od -bc foo.Z
    0000000 037 235 220 124 320 224 001 321 346 315 033 067 040 322 314 041
             037 235 220   T 320 224 001 321 346 315 033   7     322 314   !
    0000020 030 206 314 300 067 146 100 214 021 130 146 116 031 005
             030 206 314 300   7   f   @ 214 021   X   f   N 031 005
    0000036
    /home/test:
    

    --
    I'm Not Just Another Perl Hacker