in reply to Re^2: Multi file stream with IO::Compress::Zip
in thread Multi file stream with IO::Compress::Zip

If a streamed Zip file with multiple members is what you need then Archive::Zip::SimpleZip is probably the best way to go.

I see in your code you've used '-' to force streaming. You can explicitly request streaming to a file/buffer by specifying the Stream option, as shown below. If writing to STDOUT is what you need, then you don't need to explicitly set it.

## Explicitly ask for Stream is set to 1 my $z = new Archive::Zip::SimpleZip "somefile.zip, Stream => 1 or print STDERR "Cannot create zip file: $SimpleZipError\n";

FYI - I wrote Archive::Zip::SimpleZip because the interface I provided in IO::Compress::Zip to create a Zip file with multiple members is not the easiest to use. Archive::Zip::SimpleZip is just a wrapper around IO::Compress::Zip to make this use-case as easy as possible.

Replies are listed 'Best First'.
Re^4: Multi file stream with IO::Compress::Zip
by Rodster001 (Pilgrim) on Sep 17, 2014 at 16:36 UTC
    I am using Archive::Zip::SimpleZip and it works exactly as needed. Thanks for your work, it's great!