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

NAME

6       pigz, unpigz - compress or expand files
7

SYNOPSIS

9       pigz [ -cdfhikKlLnNqrRtTz0..9 ] [ -b blocksize ] [ -p threads ] [ -S suffix ] [
10       name ...  ]
11       unpigz [ -cfhikKlLnNqrRtTz ] [ -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.
45
46       Decompression can't be parallelized, at  least  not  without  specially
47       prepared  deflate  streams  for that purpose.  As a result, pigz uses a
48       single thread (the main thread)  for  decompression,  but  will  create
49       three  other threads for reading, writing, and check calculation, which
50       can speed up decompression under some circumstances.   Parallel  decom‐
51       pression  can  be turned off by specifying one process ( -dp 1 or -tp 1
52       ).
53
54       Compressed files can be restored to their original form using  pigz  -d
55       or unpigz.
56
57

OPTIONS

59       -# --fast --best
60              Regulate  the  speed of compression using the specified digit #,
61              where -1 or --fast  indicates  the  fastest  compression  method
62              (less  compression)  and -9 or --best indicates the slowest com‐
63              pression method (best compression).  Level 0 is no compression.
64
65       -b --blocksize mmm
66              Set compression block size to mmmK (default 128KiB).
67
68       -c --stdout --to-stdout
69              Write all processed output to stdout (won't delete).
70
71       -d --decompress --uncompress
72              Decompress the compressed input.
73
74       -f --force
75              Force overwrite, compress .gz, links, and to terminal.
76
77       -h --help
78              Display a help screen and quit.
79
80       -i --independent
81              Compress blocks independently for damage recovery.
82
83       -k --keep
84              Do not delete original file after processing.
85
86       -K --zip
87              Compress to PKWare zip (.zip) single entry format.
88
89       -l --list
90              List the contents of the compressed input.
91
92       -L --license
93              Display the pigz license and quit.
94
95       -n --no-name
96              Do not store or restore file name in/from header.
97
98       -N --name
99              Store/restore file name and mod time in/from header.
100
101       -p --processes n
102              Allow up to n processes (default is the number of online proces‐
103              sors)
104
105       -q --quiet --silent
106              Print no messages, even on error.
107
108       -r --recursive
109              Process the contents of all subdirectories.
110
111       -S --suffix .sss
112              Use suffix .sss instead of .gz (for compression).
113
114       -t --test
115              Test the integrity of the compressed input.
116
117       -T --no-time
118              Do not store or restore mod time in/from header.
119
120       -v --verbose
121              Provide more verbose output.
122
123       -V --version
124              Show the version of pigz.
125
126       -z --zlib
127              Compress to zlib (.zz) instead of gzip format.
128
130       This  software is provided 'as-is', without any express or implied war‐
131       ranty.  In no event will the author be  held  liable  for  any  damages
132       arising from the use of this software.
133
134       Copyright  (C)  2007,  2008,  2009, 2010 Mark Adler <madler@alumni.cal‐
135       tech.edu>
136
137
138
139                                     local                             PIGZ(1)
Impressum