logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

pigz.1 (6872B)


  1. .TH PIGZ 1 "August 19, 2023"
  2. .SH NAME
  3. pigz, unpigz \- compress or expand files
  4. .SH SYNOPSIS
  5. .ll +8
  6. .B pigz
  7. .RB [ " \-cdfhikKlLmMnNqrRtz0..9,11 " ]
  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 [ " \-cfhikKlLmMnNqrRtz " ]
  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,
  66. which can be changed using the
  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. This also
  81. inserts an extra empty block to flag independent blocks by prefacing
  82. each with the nine-byte sequence (in hex): 00 00 FF FF 00 00 00 FF FF.
  83. .PP
  84. Decompression can't be parallelized, at least not without specially prepared
  85. deflate streams for that purpose. As a result,
  86. .I pigz
  87. uses a single thread
  88. (the main thread) for decompression, but will create three other threads for
  89. reading, writing, and check calculation, which can speed up decompression
  90. under some circumstances. Parallel decompression can be turned off by
  91. specifying one process
  92. (
  93. .B -dp 1
  94. or
  95. .B -tp 1
  96. ).
  97. .PP
  98. All options on the command line are processed before any names are processed.
  99. If no names are provided on the command line, or if "-" is given as a name (but
  100. not after "--"), then the input is taken from stdin. If the GZIP or PIGZ
  101. environment variables are set, then options are taken from their values before
  102. any command line options are processed, first from GZIP, then from PIGZ.
  103. .PP
  104. Compressed files can be restored to their original form using
  105. .I pigz -d
  106. or
  107. .I unpigz.
  108. .SH OPTIONS
  109. .TP
  110. .B -# --fast --best
  111. Regulate the speed of compression using the specified digit
  112. .IR # ,
  113. where
  114. .B \-1
  115. or
  116. .B \-\-fast
  117. indicates the fastest compression method (less compression)
  118. and
  119. .B \-9
  120. or
  121. .B \-\-best
  122. indicates the slowest compression method (best compression).
  123. .B -0
  124. is no compression.
  125. .B \-11
  126. gives a few percent better compression at a severe cost in execution time,
  127. using the zopfli algorithm by Jyrki Alakuijala.
  128. The default is
  129. .B \-6.
  130. .TP
  131. .B -A --alias xxx
  132. Use xxx as the name for any --zip entry from stdin (the default name is "-").
  133. .TP
  134. .B -b --blocksize mmm
  135. Set compression block size to mmmK (default 128KiB).
  136. .TP
  137. .B -c --stdout --to-stdout
  138. Write all processed output to stdout (won't delete).
  139. .TP
  140. .B -C --comment ccc
  141. Include the provided comment in the gzip header or zip central file header.
  142. .TP
  143. .B -d --decompress --uncompress
  144. Decompress the compressed input.
  145. .TP
  146. .B -f --force
  147. Force overwrite, compress .gz, links, and to terminal.
  148. .TP
  149. .B -h --help
  150. Display a help screen and quit.
  151. .TP
  152. .B -H --huffman
  153. Compress using the Huffman-only strategy.
  154. .TP
  155. .B -i --independent
  156. Compress blocks independently for damage recovery.
  157. .TP
  158. .B -k --keep
  159. Do not delete original file after processing.
  160. .TP
  161. .B -K --zip
  162. Compress to PKWare zip (.zip) single entry format.
  163. .TP
  164. .B -l --list
  165. List the contents of the compressed input.
  166. .TP
  167. .B -L --license
  168. Display the
  169. .I pigz
  170. license and quit.
  171. .TP
  172. .B -m --no-time
  173. Do not store or restore the modification time. -Nm will store or restore the
  174. name, but not the modification time. Note that the order of the options is
  175. important.
  176. .TP
  177. .B -M --time
  178. Store or restore the modification time. -nM will store or restore the
  179. modification time, but not the name. Note that the order of the options is
  180. important. Modification times are stored only for regular files, not pipes.
  181. .TP
  182. .B -n --no-name
  183. Do not store or restore the file name or the modification time. This is the
  184. default when decompressing. When the file name is not restored from the header,
  185. the name of the compressed file with the suffix stripped is the name of the
  186. decompressed file. When the modification time is not restored from the header,
  187. the modification time of the compressed file is used (not the current time).
  188. .TP
  189. .B -N --name
  190. Store or restore both the file name and the modification time. This is the
  191. default when compressing.
  192. .TP
  193. .B -p --processes n
  194. Allow up to n processes (default is the number of online processors)
  195. .TP
  196. .B -q --quiet --silent
  197. Print no messages, even on error.
  198. .TP
  199. .B -r --recursive
  200. Process the contents of all subdirectories.
  201. .TP
  202. .B -R --rsyncable
  203. Input-determined block locations for rsync.
  204. .TP
  205. .B -S --suffix .sss
  206. Use suffix .sss instead of .gz (for compression).
  207. .TP
  208. .B -t --test
  209. Test the integrity of the compressed input.
  210. .TP
  211. .B -U --rle
  212. Compress using the run length encoding strategy.
  213. .TP
  214. .B -v --verbose
  215. Provide more verbose output.
  216. .TP
  217. .B -V --version
  218. Show the version of pigz. -vV also shows the zlib version.
  219. .TP
  220. .B -z --zlib
  221. Compress to zlib (.zz) instead of gzip format.
  222. .TP
  223. .B --
  224. All arguments after "--" are treated as file names (for names that start with "-")
  225. .TP
  226. These options are unique to the -11 compression level:
  227. .TP
  228. .B -F --first
  229. Do iterations first, before block split (default is last).
  230. .TP
  231. .B -I, --iterations n
  232. Number of iterations for optimization (default 15).
  233. .TP
  234. .B -J, --maxsplits n
  235. Maximum number of split blocks (default 15).
  236. .TP
  237. .B -O --oneblock
  238. Do not split into smaller blocks (default is block splitting).
  239. .SH "COPYRIGHT NOTICE"
  240. This software is provided 'as-is', without any express or implied
  241. warranty. In no event will the author be held liable for any damages
  242. arising from the use of this software.
  243. .PP
  244. Copyright (C) 2007-2023 Mark Adler <madler@alumni.caltech.edu>