Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 1 | .TH PIGZ 1 local |
| 2 | .SH NAME |
| 3 | pigz, unpigz \- compress or expand files |
| 4 | .SH SYNOPSIS |
| 5 | .ll +8 |
| 6 | .B pigz |
| 7 | .RB [ " \-cdfhikKlLnNqrRtTz0..9 " ] |
| 8 | [ |
| 9 | .B -b |
| 10 | .I blocksize |
| 11 | ] |
| 12 | [ |
| 13 | .B -p |
| 14 | .I threads |
| 15 | ] |
| 16 | [ |
| 17 | .B -S |
| 18 | .I suffix |
| 19 | ] |
| 20 | [ |
| 21 | .I "name \&..." |
| 22 | ] |
| 23 | .ll -8 |
| 24 | .br |
| 25 | .B unpigz |
| 26 | .RB [ " \-cfhikKlLnNqrRtTz " ] |
| 27 | [ |
| 28 | .B -b |
| 29 | .I blocksize |
| 30 | ] |
| 31 | [ |
| 32 | .B -p |
| 33 | .I threads |
| 34 | ] |
| 35 | [ |
| 36 | .B -S |
| 37 | .I suffix |
| 38 | ] |
| 39 | [ |
| 40 | .I "name \&..." |
| 41 | ] |
| 42 | .SH DESCRIPTION |
| 43 | .I Pigz |
| 44 | compresses using threads to make use of multiple processors and cores. |
| 45 | The input is broken up into 128 KB chunks with each compressed in parallel. |
| 46 | The individual check value for each chunk is also calculated in parallel. |
| 47 | The compressed data is written in order to the output, and a combined check |
| 48 | value is calculated from the individual check values. |
| 49 | .PP |
| 50 | The compressed data format generated is in the gzip, zlib, or single-entry |
| 51 | zip format using the deflate compression method. The compression produces |
| 52 | partial raw deflate streams which are concatenated by a single write thread |
| 53 | and wrapped with the appropriate header and trailer, where the trailer |
| 54 | contains the combined check value. |
| 55 | .PP |
| 56 | Each partial raw deflate stream is terminated by an empty stored block |
| 57 | (using the Z_SYNC_FLUSH option of zlib), in order to end that partial bit |
| 58 | stream at a byte boundary. That allows the partial streams to be |
| 59 | concatenated simply as sequences of bytes. This adds a very small four to |
| 60 | five byte overhead to the output for each input chunk. |
| 61 | .PP |
| 62 | The default input block size is 128K, but can be changed with the |
| 63 | .B -b |
| 64 | option. The number of compress threads is set by default to the number |
| 65 | of online processors, |
Dees_Troy | 3bde123 | 2012-09-22 08:10:28 -0400 | [diff] [blame] | 66 | which can be changed using the |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 67 | .B -p |
| 68 | option. Specifying |
| 69 | .B -p 1 |
| 70 | avoids the use of threads entirely. |
| 71 | .PP |
| 72 | The input blocks, while compressed independently, have the last 32K of the |
| 73 | previous block loaded as a preset dictionary to preserve the compression |
| 74 | effectiveness of deflating in a single thread. This can be turned off using |
| 75 | the |
| 76 | .B -i |
| 77 | or |
| 78 | .B --independent |
| 79 | option, so that the blocks can be decompressed |
| 80 | independently for partial error recovery or for random access. |
| 81 | .PP |
| 82 | Decompression can't be parallelized, at least not without specially prepared |
| 83 | deflate streams for that purpose. As a result, |
| 84 | .I pigz |
| 85 | uses a single thread |
| 86 | (the main thread) for decompression, but will create three other threads for |
| 87 | reading, writing, and check calculation, which can speed up decompression |
| 88 | under some circumstances. Parallel decompression can be turned off by |
Dees_Troy | 3bde123 | 2012-09-22 08:10:28 -0400 | [diff] [blame] | 89 | specifying one process |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 90 | ( |
| 91 | .B -dp 1 |
| 92 | or |
| 93 | .B -tp 1 |
| 94 | ). |
| 95 | .PP |
| 96 | Compressed files can be restored to their original form using |
| 97 | .I pigz -d |
| 98 | or |
| 99 | .I unpigz. |
| 100 | |
| 101 | .SH OPTIONS |
| 102 | .TP |
| 103 | .B -# --fast --best |
| 104 | Regulate the speed of compression using the specified digit |
| 105 | .IR # , |
| 106 | where |
| 107 | .B \-1 |
| 108 | or |
| 109 | .B \-\-fast |
| 110 | indicates the fastest compression method (less compression) |
| 111 | and |
| 112 | .B \-9 |
| 113 | or |
| 114 | .B \-\-best |
| 115 | indicates the slowest compression method (best compression). |
| 116 | Level 0 is no compression. |
| 117 | .TP |
| 118 | .B -b --blocksize mmm |
| 119 | Set compression block size to mmmK (default 128KiB). |
| 120 | .TP |
| 121 | .B -c --stdout --to-stdout |
| 122 | Write all processed output to stdout (won't delete). |
| 123 | .TP |
| 124 | .B -d --decompress --uncompress |
| 125 | Decompress the compressed input. |
| 126 | .TP |
| 127 | .B -f --force |
| 128 | Force overwrite, compress .gz, links, and to terminal. |
| 129 | .TP |
| 130 | .B -h --help |
| 131 | Display a help screen and quit. |
| 132 | .TP |
| 133 | .B -i --independent |
| 134 | Compress blocks independently for damage recovery. |
| 135 | .TP |
| 136 | .B -k --keep |
| 137 | Do not delete original file after processing. |
| 138 | .TP |
| 139 | .B -K --zip |
| 140 | Compress to PKWare zip (.zip) single entry format. |
| 141 | .TP |
| 142 | .B -l --list |
| 143 | List the contents of the compressed input. |
| 144 | .TP |
| 145 | .B -L --license |
| 146 | Display the |
| 147 | .I pigz |
| 148 | license and quit. |
| 149 | .TP |
| 150 | .B -n --no-name |
| 151 | Do not store or restore file name in/from header. |
| 152 | .TP |
| 153 | .B -N --name |
| 154 | Store/restore file name and mod time in/from header. |
| 155 | .TP |
| 156 | .B -p --processes n |
| 157 | Allow up to n processes (default is the number of online processors) |
| 158 | .TP |
| 159 | .B -q --quiet --silent |
| 160 | Print no messages, even on error. |
| 161 | .TP |
| 162 | .B -r --recursive |
| 163 | Process the contents of all subdirectories. |
| 164 | .TP |
Dees_Troy | 3bde123 | 2012-09-22 08:10:28 -0400 | [diff] [blame] | 165 | .B -R --rsyncable |
| 166 | Input-determined block locations for rsync. |
| 167 | .TP |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 168 | .B -S --suffix .sss |
| 169 | Use suffix .sss instead of .gz (for compression). |
| 170 | .TP |
| 171 | .B -t --test |
| 172 | Test the integrity of the compressed input. |
| 173 | .TP |
| 174 | .B -T --no-time |
| 175 | Do not store or restore mod time in/from header. |
| 176 | .TP |
| 177 | .B -v --verbose |
| 178 | Provide more verbose output. |
| 179 | .TP |
| 180 | .B -V --version |
| 181 | Show the version of pigz. |
| 182 | .TP |
| 183 | .B -z --zlib |
| 184 | Compress to zlib (.zz) instead of gzip format. |
Dees_Troy | 3bde123 | 2012-09-22 08:10:28 -0400 | [diff] [blame] | 185 | .TP |
| 186 | .B -- |
| 187 | All arguments after "--" are treated as file names (for names that start with "-") |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 188 | .SH "COPYRIGHT NOTICE" |
| 189 | This software is provided 'as-is', without any express or implied |
| 190 | warranty. In no event will the author be held liable for any damages |
| 191 | arising from the use of this software. |
| 192 | .PP |
Dees_Troy | 3bde123 | 2012-09-22 08:10:28 -0400 | [diff] [blame] | 193 | Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Mark Adler <madler@alumni.caltech.edu> |