in reply to compressing VERY LARGE files

Why didn't Compress::Gzip didn't work for you? Study this example from the documentation:
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 ;
though if it is binary data being input you probably want to read your input instead.

Replies are listed 'Best First'.
Re: Re: compressing VERY LARGE files
by gnu@perl (Pilgrim) on Sep 27, 2002 at 12:28 UTC
    Thanks. It would seem that I didn't think past the obvious when reading the doc on Compress::Gzip. This would work fine, but I think that I am going to do what was suggested and just look for whatever compress program has been loaded onto the box. This way I can check for bzip2 then gzip and if all else fails just use compress.

    This should allow me to use whatever the better compression binary is no matter what system I am on. I won't need to worry if the so-and-so libraries are on the destination machine or not.

    Thanks for your solution. I am positive I will be using it in another project in the near future here.