in reply to compressing VERY LARGE files
though if it is binary data being input you probably want to read your input instead.use strict ; use warnings ; use Compress::Zlib ; binmode STDOUT; # gzopen only sets it on the fd my $gz = gzopen(\*STDOUT, "wb") or die "Cannot open stdout: $gzerrno\n" ; while (<>) { $gz->gzwrite($_) or die "error writing: $gzerrno\n" ; } $gz->gzclose ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: compressing VERY LARGE files
by gnu@perl (Pilgrim) on Sep 27, 2002 at 12:28 UTC |