1STREAMZIP(1)          User Contributed Perl Documentation         STREAMZIP(1)
2
3
4

NAME

6       streamzip - create a zip file from stdin
7

SYNOPSIS

9           producer | streamzip [opts] | consumer
10           producer | streamzip [opts] -zipfile=output.zip
11

DESCRIPTION

13       This program will read data from "stdin", compress it into a zip
14       container and, by default, write a streamed zip file to "stdout". No
15       temporary files are created.
16
17       The zip container written to "stdout" is, by necessity, written in
18       streaming format. Most programs that read Zip files can cope with a
19       streamed zip file, but if interoperability is important, and your
20       workflow allows you to write the zip file directly to disk you can
21       create a non-streamed zip file using the "zipfile" option.
22
23   OPTIONS
24       -zip64
25            Create a Zip64-compliant zip container. Use this option if the
26            input is greater than 4Gig.
27
28            Default is disabled.
29
30       -zipfile=F
31            Write zip container to the filename "F".
32
33            Use the "Stream" option to force the creation of a streamed zip
34            file.
35
36       -member-name=M
37            This option is used to name the "file" in the zip container.
38
39            Default is '-'.
40
41       -stream
42            Ignored when writing to "stdout".
43
44            If the "zipfile" option is specified, including this option will
45            trigger the creation of a streamed zip file.
46
47            Default: Always enabled when writing to "stdout", otherwise
48            disabled.
49
50       -method=M
51            Compress using method "M".
52
53            Valid method names are
54
55                * store    Store without compression
56                * deflate  Use Deflate compression [Deflault]
57                * bzip2    Use Bzip2 compression
58                * lzma     Use LZMA compression
59                * xz       Use xz compression
60                * zstd     Use Zstandard compression
61
62            Note that Lzma compress needs "IO::Compress::Lzma" to be
63            installed.
64
65            Note that Zstd compress needs "IO::Compress::Zstd" to be
66            installed.
67
68            Default is "deflate".
69
70       -0, -1, -2, -3, -4, -5, -6, -7, -8, -9
71            Sets the compression level for "deflate". Ignored for all other
72            compression methods.
73
74            "-0" means no compression and "-9" for maximum compression.
75
76            Default is 6
77
78       -version
79            Display version number
80
81       -help
82            Display help
83
84   Examples
85       Create a zip file bt reading daa from stdin
86
87           $ echo Lorem ipsum dolor sit | perl ./bin/streamzip >abcd.zip
88
89       Check the contents of "abcd,zip" with the standard "unzip" utility
90
91           Archive:  abcd.zip
92             Length      Date    Time    Name
93           ---------  ---------- -----   ----
94                  22  2021-01-08 19:45   -
95           ---------                     -------
96                  22                     1 file
97
98       Notice how the "Name" is set to "-".  That is the default for a few zip
99       utilities whwre the member name is not given.
100
101       If you want to explicitly name the file, use the "-member-name" option
102       as follows
103
104           $ echo Lorem ipsum dolor sit | perl ./bin/streamzip -member-name latin >abcd.zip
105
106           $ unzip -l abcd.zip
107           Archive:  abcd.zip
108             Length      Date    Time    Name
109           ---------  ---------- -----   ----
110                  22  2021-01-08 19:47   latin
111           ---------                     -------
112                  22                     1 file
113
114   When to write a Streamed Zip File
115       A Streamed Zip File is useful in situations where you cannot seek
116       backwards/forwards in the file.
117
118       A good examples is when you are serving dynamic content from a Web
119       Server straight into a socket without needing to create a temporary zip
120       file in the filesystsm.
121
122       Similarly if your workfow uses a Linux pipelined commands.
123

SUPPORT

125       General feedback/questions/bug reports should be sent to
126       <https://github.com/pmqs/IO-Compress/issues> (preferred) or
127       <https://rt.cpan.org/Public/Dist/Display.html?Name=IO-Compress>.
128

AUTHOR

130       Paul Marquess pmqs@cpan.org.
131
133       Copyright (c) 2019-2021 Paul Marquess. All rights reserved.
134
135       This program is free software; you can redistribute it and/or modify it
136       under the same terms as Perl itself.
137
138
139
140perl v5.34.0                      2022-01-21                      STREAMZIP(1)
Impressum