1PIGZ(1)                     General Commands Manual                    PIGZ(1)
2
3
4

NAME

6       pigz, unpigz - compress or expand files
7

SYNOPSIS

9       pigz [ -cdfhikKlLmMnNqrRtz0..9,11 ] [ -b blocksize ] [ -p threads ] [ -S suffix
10       ] [ name ...  ]
11       unpigz [ -cfhikKlLmMnNqrRtz ] [ -b blocksize ] [ -p threads ] [ -S suf‐
12       fix ] [ name ...  ]
13

DESCRIPTION

15       Pigz  compresses  using  threads to make use of multiple processors and
16       cores.  The input is broken up into 128 KB chunks with each  compressed
17       in  parallel.  The individual check value for each chunk is also calcu‐
18       lated in parallel.  The compressed data is written in order to the out‐
19       put, and a combined check value is calculated from the individual check
20       values.
21
22       The compressed data format generated is in the gzip, zlib,  or  single-
23       entry zip format using the deflate compression method.  The compression
24       produces partial raw deflate streams which are concatenated by a single
25       write thread and wrapped with the appropriate header and trailer, where
26       the trailer contains the combined check value.
27
28       Each partial raw deflate stream is terminated by an empty stored  block
29       (using  the  Z_SYNC_FLUSH option of zlib), in order to end that partial
30       bit stream at a byte boundary.  That allows the partial streams  to  be
31       concatenated simply as sequences of bytes.  This adds a very small four
32       to five byte overhead to the output for each input chunk.
33
34       The default input block size is 128K, but can be changed  with  the  -b
35       option.  The number of compress threads is set by default to the number
36       of online processors, which can be changed using the -p option.  Speci‐
37       fying -p 1 avoids the use of threads entirely.
38
39       The  input blocks, while compressed independently, have the last 32K of
40       the previous block loaded as a preset dictionary to preserve  the  com‐
41       pression  effectiveness  of  deflating in a single thread.  This can be
42       turned off using the -i or --independent option, so that the blocks can
43       be  decompressed independently for partial error recovery or for random
44       access. This also inserts an extra  empty  block  to  flag  independent
45       blocks by prefacing each with the nine-byte sequence (in hex): 00 00 FF
46       FF 00 00 00 FF FF.
47
48       Decompression can't be parallelized, at  least  not  without  specially
49       prepared  deflate  streams  for that purpose.  As a result, pigz uses a
50       single thread (the main thread)  for  decompression,  but  will  create
51       three  other threads for reading, writing, and check calculation, which
52       can speed up decompression under some circumstances.   Parallel  decom‐
53       pression  can  be turned off by specifying one process ( -dp 1 or -tp 1
54       ).
55
56       All options on the command line are processed before any names are pro‐
57       cessed.   If  no  names  are provided on the command line, or if "-" is
58       given as a name (but not after "--"), then  the  input  is  taken  from
59       stdin.
60
61       Compressed  files  can be restored to their original form using pigz -d
62       or unpigz.
63
64

OPTIONS

66       -# --fast --best
67              Regulate the speed of compression using the specified  digit  #,
68              where  -1  or  --fast  indicates  the fastest compression method
69              (less compression) and -9 or --best indicates the  slowest  com‐
70              pression  method (best compression).  -0 is no compression.  -11
71              gives a few percent better compression at a severe cost in  exe‐
72              cution  time,  using  the  zopfli algorithm by Jyrki Alakuijala.
73              The default is -6.
74
75       -b --blocksize mmm
76              Set compression block size to mmmK (default 128KiB).
77
78       -c --stdout --to-stdout
79              Write all processed output to stdout (won't delete).
80
81       -d --decompress --uncompress
82              Decompress the compressed input.
83
84       -f --force
85              Force overwrite, compress .gz, links, and to terminal.
86
87       -h --help
88              Display a help screen and quit.
89
90       -i --independent
91              Compress blocks independently for damage recovery.
92
93       -k --keep
94              Do not delete original file after processing.
95
96       -K --zip
97              Compress to PKWare zip (.zip) single entry format.
98
99       -l --list
100              List the contents of the compressed input.
101
102       -L --license
103              Display the pigz license and quit.
104
105       -m --no-time
106              Do not store or restore the modification time. -Nm will store or
107              restore  the  name, but not the modification time. Note that the
108              order of the options is important.
109
110       -M --time
111              Store or restore  the  modification  time.  -nM  will  store  or
112              restore  the  modification time, but not the name. Note that the
113              order of the options is important.
114
115       -n --no-name
116              Do not store or restore the file name or the modification  time.
117              This  is  the  default when decompressing. When the file name is
118              not restored from the header, the name of  the  compressed  file
119              with  the  suffix stripped is the name of the decompressed file.
120              When the modification time is not restored from the header,  the
121              modification  time  of the compressed file is used (not the cur‐
122              rent time).
123
124       -N --name
125              Store or restore both the file name and the  modification  time.
126              This is the default when compressing.
127
128       -p --processes n
129              Allow up to n processes (default is the number of online proces‐
130              sors)
131
132       -q --quiet --silent
133              Print no messages, even on error.
134
135       -r --recursive
136              Process the contents of all subdirectories.
137
138       -R --rsyncable
139              Input-determined block locations for rsync.
140
141       -S --suffix .sss
142              Use suffix .sss instead of .gz (for compression).
143
144       -t --test
145              Test the integrity of the compressed input.
146
147       -v --verbose
148              Provide more verbose output.
149
150       -V --version
151              Show the version of pigz. -vV also shows the zlib version.
152
153       -z --zlib
154              Compress to zlib (.zz) instead of gzip format.
155
156       --     All arguments after "--" are treated as file  names  (for  names
157              that start with "-")
158
159       These options are unique to the -11 compression level:
160
161       -F --first
162              Do iterations first, before block split (default is last).
163
164       -I, --iterations n
165              Number of iterations for optimization (default 15).
166
167       -J, --maxsplits n
168              Maximum number of split blocks (default 15).
169
170       -O --oneblock
171              Do not split into smaller blocks (default is block splitting).
172
174       This  software is provided 'as-is', without any express or implied war‐
175       ranty.  In no event will the author be  held  liable  for  any  damages
176       arising from the use of this software.
177
178       Copyright (C) 2007-2017 Mark Adler <madler@alumni.caltech.edu>
179
180
181
182                               December 26, 2017                       PIGZ(1)
Impressum