Debian Codegraph @

upstream/mageia-cauldron/man1/streamzip.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "STREAMZIP 1"
61 .TH STREAMZIP 1 2026-05-26 "perl v5.42.0" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 streamzip \- create a zip file from stdin
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 2
71 \& producer | streamzip [opts] | consumer
72 \& producer | streamzip [opts] \-zipfile=output.zip
73 .Ve
74 .SH DESCRIPTION
75 .IX Header "DESCRIPTION"
76 This program will read data from \f(CW\*(C`stdin\*(C'\fR, compress it into a zip container
77 and, by default, write a \fIstreamed\fR zip file to \f(CW\*(C`stdout\*(C'\fR. No temporary
78 files are created.
79 .PP
80 The zip container written to \f(CW\*(C`stdout\*(C'\fR is, by necessity, written in
81 streaming format. Most programs that read Zip files can cope with a
82 streamed zip file, but if interoperability is important, and your workflow
83 allows you to write the zip file directly to disk you can create a
84 non\-streamed zip file using the \f(CW\*(C`zipfile\*(C'\fR option.
85 .SS OPTIONS
86 .IX Subsection "OPTIONS"
87 .IP \-zip64 5
88 .IX Item "-zip64"
89 Create a Zip64\-compliant zip container. Use this option if the input is
90 greater than 4Gig.
91 .Sp
92 Default is disabled.
93 .IP \-zipfile=F 5
94 .IX Item "-zipfile=F"
95 Write zip container to the filename \f(CW\*(C`F\*(C'\fR.
96 .Sp
97 Use the \f(CW\*(C`Stream\*(C'\fR option to force the creation of a streamed zip file.
98 .IP \-member\-name=M 5
99 .IX Item "-member-name=M"
100 This option is used to name the "file" in the zip container.
101 .Sp
102 Default is \*(Aq\-\*(Aq.
103 .IP \-stream 5
104 .IX Item "-stream"
105 Ignored when writing to \f(CW\*(C`stdout\*(C'\fR.
106 .Sp
107 If the \f(CW\*(C`zipfile\*(C'\fR option is specified, including this option will trigger
108 the creation of a streamed zip file.
109 .Sp
110 Default: Always enabled when writing to \f(CW\*(C`stdout\*(C'\fR, otherwise disabled.
111 .IP \-method=M 5
112 .IX Item "-method=M"
113 Compress using method \f(CW\*(C`M\*(C'\fR.
114 .Sp
115 Valid method names are
116 .Sp
117 .Vb 6
118 \& * store Store without compression
119 \& * deflate Use Deflate compression [Deflault]
120 \& * bzip2 Use Bzip2 compression
121 \& * lzma Use LZMA compression
122 \& * xz Use xz compression
123 \& * zstd Use Zstandard compression
124 .Ve
125 .Sp
126 Note that Lzma compress needs \f(CW\*(C`IO::Compress::Lzma\*(C'\fR to be installed.
127 .Sp
128 Note that Zstd compress needs \f(CW\*(C`IO::Compress::Zstd\*(C'\fR to be installed.
129 .Sp
130 Default is \f(CW\*(C`deflate\*(C'\fR.
131 .IP "\-0, \-1, \-2, \-3, \-4, \-5, \-6, \-7, \-8, \-9" 5
132 .IX Item "-0, -1, -2, -3, -4, -5, -6, -7, -8, -9"
133 Sets the compression level for \f(CW\*(C`deflate\*(C'\fR. Ignored for all other compression methods.
134 .Sp
135 \&\f(CW\-0\fR means no compression and \f(CW\-9\fR for maximum compression.
136 .Sp
137 Default is 6
138 .IP \-version 5
139 .IX Item "-version"
140 Display version number
141 .IP \-help 5
142 .IX Item "-help"
143 Display help
144 .SS Examples
145 .IX Subsection "Examples"
146 Create a zip file bt reading daa from stdin
147 .PP
148 .Vb 1
149 \& $ echo Lorem ipsum dolor sit | perl ./bin/streamzip >abcd.zip
150 .Ve
151 .PP
152 Check the contents of \f(CW\*(C`abcd,zip\*(C'\fR with the standard \f(CW\*(C`unzip\*(C'\fR utility
153 .PP
154 .Vb 6
155 \& Archive: abcd.zip
156 \& Length Date Time Name
157 \& \-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\- \-\-\-\-
158 \& 22 2021\-01\-08 19:45 \-
159 \& \-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-
160 \& 22 1 file
161 .Ve
162 .PP
163 Notice how the \f(CW\*(C`Name\*(C'\fR is set to \f(CW\*(C`\-\*(C'\fR.
164 That is the default for a few zip utilities whwre the member name is not given.
165 .PP
166 If you want to explicitly name the file, use the \f(CW\*(C`\-member\-name\*(C'\fR option as follows
167 .PP
168 .Vb 1
169 \& $ echo Lorem ipsum dolor sit | perl ./bin/streamzip \-member\-name latin >abcd.zip
170 \&
171 \& $ unzip \-l abcd.zip
172 \& Archive: abcd.zip
173 \& Length Date Time Name
174 \& \-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\- \-\-\-\-
175 \& 22 2021\-01\-08 19:47 latin
176 \& \-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-
177 \& 22 1 file
178 .Ve
179 .SS "When to write a Streamed Zip File"
180 .IX Subsection "When to write a Streamed Zip File"
181 A Streamed Zip File is useful in situations where you cannot seek
182 backwards/forwards in the file.
183 .PP
184 A good examples is when you are serving dynamic content from a Web Server
185 straight into a socket without needing to create a temporary zip file in
186 the filesystsm.
187 .PP
188 Similarly if your workfow uses a Linux pipelined commands.
189 .SH SUPPORT
190 .IX Header "SUPPORT"
191 General feedback/questions/bug reports should be sent to
192 <https://github.com/pmqs/IO\-Compress/issues> (preferred) or
193 <https://rt.cpan.org/Public/Dist/Display.html?Name=IO\-Compress>.
194 .SH AUTHOR
195 .IX Header "AUTHOR"
196 Paul Marquess \[email protected]\fR.
197 .SH COPYRIGHT
198 .IX Header "COPYRIGHT"
199 Copyright (c) 2019\-2024 Paul Marquess. All rights reserved.
200 .PP
201 This program is free software; you can redistribute it and/or modify it
202 under the same terms as Perl itself.