STREAMZIP(1)
π STREAMZIP(1) β like, the streamzip page, but make it make sense π
okay bestie, welcome to STREAMZIP(1) from the User Contributed Perl Documentation crew β this is the whole manual, but in a voice you'll actually enjoy reading. let's go β¨
π NAME
streamzip β bestie, it makes a zip file out of stdin. that's the whole vibe. π
π¦ SYNOPSIS
producer | streamzip [opts] | consumer
producer | streamzip [opts] -zipfile=output.zip
like, producer on the left, consumer on the right, streamzip in the middle holding it all together. main character energy fr fr. π
πΈ DESCRIPTION
so this program reads data from stdin, squishes it into a zip container, and β by default β writes a streamed zip file straight out to stdout. and the iconic part? no temporary files are created. not one. zero. clean. π§
now, the zip container it writes to stdout is, by necessity, written in streaming format. most programs that read Zip files can totally cope with a streamed zip file, no drama. but β and this is the lowkey important bit β if interoperability matters to you, and your workflow lets you write the zip file directly to disk, you can create a non-streamed zip file using the zipfile option instead. slay. π
β¨ OPTIONS
-zip64β makes a Zip64-compliant zip container. use this one if your input is bigger than 4Gig. default is disabled (so, off unless you say otherwise). π-zipfile=Fβ writes the zip container to the filenameF. and if you want to force a streamed zip file anyway? use theStreamoption for that. π«Ά-member-name=Mβ this is the option that names the "file" inside the zip container. default is-. yes, literally a dash. iconic. π-streamβ ignored when writing tostdout. but if thezipfileoption is specified, including this option will trigger the creation of a streamed zip file. default: always enabled when writing tostdout, otherwise disabled. π¦-method=Mβ compress using methodM. the valid method names are:storeβ store without compressiondeflateβ use Deflate compression [Default]bzip2β use Bzip2 compressionlzmaβ use LZMA compressionxzβ use xz compressionzstdβ use Zstandard compression
heads up bestie: Lzma compress needsIO::Compress::Lzmato be installed. π also heads up: Zstd compress needsIO::Compress::Zstdto be installed. π
default is deflate. π
-0,-1,-2,-3,-4,-5,-6,-7,-8,-9β sets the compression level fordeflate. ignored for all other compression methods, sorry not sorry.-0means no compression and-9means maximum compression. default is 6. π₯-versionβ display version number β-helpβ display help πΈ
π Examples
create a zip file by reading data from stdin:
$ echo Lorem ipsum dolor sit | perl ./bin/streamzip >abcd.zip
check the contents of abcd,zip with the standard unzip utility:
Archive: abcd.zip
Length Date Time Name
--------- ---------- ----- ----
22 2021-01-08 19:45 -
--------- -------
22 1 file
notice how the "Name" is set to -? that's the default for a few zip utilities where the member name is not given. no cap. π
if you want to explicitly name the file, use the -member-name option like this:
$ echo Lorem ipsum dolor sit | perl ./bin/streamzip -member-name latin >abcd.zip
$ unzip -l abcd.zip
Archive: abcd.zip
Length Date Time Name
--------- ---------- ----- ----
22 2021-01-08 19:47 latin
--------- -------
22 1 file
see? latin. named. gorgeous. β¨
π When to write a Streamed Zip File
a Streamed Zip File is useful in situations where you cannot seek backwards/forwards in the file. like, you just can't. it's not happening. π
a good example is when you're serving dynamic content from a Web Server straight into a socket without needing to create a temporary zip file in the filesystem. chef's kiss. π«Ά
similarly, if your workflow uses a Linux pipelined commands. yep, that too. π¦
π₯ SUPPORT
general feedback/questions/bug reports should be sent to <https://github.com/pmqs/IO-Compress/issues> (preferred) or <https://rt.cpan.org/Public/Dist/Display.html?Name=IO-Compress>. they literally want to hear from you, bestie. π
π AUTHOR
Paul Marquess pmqs@cpan.org. iconic behavior. π
π§ COPYRIGHT
Copyright (c) 2019-2026 Paul Marquess. All rights reserved.
this program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. periodt. π
and that's the whole page, bestie β written from the perl v5.42.0 docs, dated 2026-05-17, and yes that's the STREAMZIP(1) footer, folded into this cute little sign-off so you don't have to stare at a boring line at the bottom. mwah. π
π¦ where this page comes from
- opensuse-leap 16.0: perl-IO-Compress 2.220.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms