Category

Generic


Usage

pigz [options] [files ...]


Manual

pigz compress files in place, adding the suffix .gz. If no files are specified, stdin will be compressed to stdout. pigz does what gzip does, but spreads the work over multiple processors and cores when compressing.

Compressed files can be restored to their original form using pigz -d or unpigz.

Options

  • -0 to -9, -11: Compression level. The default is -6
    • -1 or --fast indicates the fastest compression method (less compression)
    • -9 or --best indicates the slowest compression method (best compression)
    • -0  is no compression
    • -11 gives a few percent better compression at a severe cost in execution time, using the zopfli algorithm by Jyrki Alakuijala.
  • --fast, --best: Compression levels -1 and -9 respectively
  • -A, --alias xxx: Use xxx as the name for any --zip entry from stdin
  • -b, --blocksize mmm: Set compression block size to mmmK (default 128K)
  • -c, --stdout: Write all processed output to stdout (won't delete)
  • -C, --comment ccc: Put comment ccc in the gzip or zip header
  • -d, --decompress: Decompress the compressed input
  • -f, --force: Force overwrite, compress .gz, links, and to terminal
  • -F, --first: Do iterations first, before block split for -11
  • -h, --help: Display a help screen and quit
  • -i, --independent: Compress blocks independently for damage recovery
  • -I, --iterations n: Number of iterations for -11 optimization
  • -J, --maxsplits n: Maximum number of split blocks for -11
  • -k, --keep: Do not delete original file after processing
  • -K, --zip: Compress to PKWare zip (.zip) single entry format
  • -l, --list: List the contents of the compressed input
  • -L, --license: Display the pigz license and quit
  • -m, --no-time: Do not store or restore the modification time. -N -m will store or restore the name, but not the modification time. Note that the order of the options is important.
  • -M, --time: Store or restore the modification time. -n -M will store or restore the modification time, but not the name. Note that the order of the options is important.
  • -n, --no-name: Do not store or restore the file name or the modification time. This is the default when decompressing. When the file name is not restored from the header, the name of the compressed file with the suffix stripped is the name of the decompressed file. When the modification time is not restored from the header, the modification time of the compressed file is used (not the current time).
  • -N, --name: Store or restore both the file name and the modification time. This is the default when compressing.
  • -O, --oneblock: Do not split into smaller blocks for -11
  • -p, --processes n: Allow up to n compression threads (default is the number of online processors, or 8 if unknown). Specifying -p 1 avoids the use of threads entirely.
  • -q, --quiet: Print no messages, even on error
  • -r, --recursive: Process the contents of all subdirectories
  • -R, --rsyncable: Input-determined block locations for rsync
  • -S, --suffix .sss: Use suffix .sss instead of .gz (for compression)
  • -t, --test: Test the integrity of the compressed input
  • -v, --verbose: Provide more verbose output
  • -V, --version: Show the version of pigz
  • -Y, --synchronous: Force output file write to permanent storage
  • -z, --zlib: Compress to zlib (.zz) instead of gzip format
  • --: All arguments after "--" are treated as files

 

Protocols using this tool

Download Fastq files from NCBI SRA database

Share your experience or ask a question