[boulder.pm] perl read .gz?

Dan Moore moore at xor.com
Thu Jun 8 17:14:12 CDT 2000


On Thu, 8 Jun 2000, Robert L. Harris wrote:

> 
> 
> Is there a perl module to let me read a .gz or .Z file as if it was 
> plain text?  I'm currently doing a:
> 
> open(INFILE, "gunzip -c file.gz |");
> while(<INFILE>) {
>   #stuff
> }

It's my understanding (from the man page) that gzip uses Lempel-Ziv
encoding.

Searching for 'compression' on CPAN yields a few modules that seem to deal
with Lempel-Ziv encoding--but nothing explicitly to do with gzip.  You
could test those modules, I guess.

Dan




More information about the Boulder-pm mailing list