Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my $bfile = "c:\\backups\\datafile_01.dbf"; my $fsize = floor((-s $bfile) / 1024); my $bfiledst = $bfile . ".zip"; my $zip = Archive::Zip->new(); my $member = $zip->addFile($bfile, $bfile); $member->desiredCompressionMethod( COMPRESSION_DEFLATED ); $member->desiredCompressionLevel( 9 ); push @summary, "Error compressing $bfile\n" if ($zip->writeToFileName +d($bfiledst) != AZ_OK); my $cfsize = floor((-s $bfiledst) / 1024); print "Compressed $bfile ($fsize K) to $bfiledst ($cfsize K)\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Archive Zip, testing & more
by Thelonius (Priest) on Nov 19, 2002 at 21:52 UTC | |
|
Re: Archive Zip, testing & more
by John M. Dlugosz (Monsignor) on Nov 19, 2002 at 22:21 UTC | |
|
Re: Archive Zip, testing & more
by Mr. Muskrat (Canon) on Nov 20, 2002 at 15:12 UTC |