Leser: 16
my $string_member = $zip->addString( 'This is a test', 'stringMember.txt' );
1 2 3 4 5 6 7 8 9 10 11 12 13
use Compress::Raw::Zlib; sub Zip { my ($d, $status) = new Compress::Raw::Zlib::Deflate( -Level => Z_BEST_COMPRESSION ); my $result; my $status = $d->deflate(shift, $result); die "deflation failed\n" unless $status == Z_OK; $status = $d->flush($result) ; die "deflation failed\n" unless $status == Z_OK; $result; }