Parallel Gzip – Pigz
leimao.github.io
leimao.github.io
For compression, pigz is only useful for compressing a single large file in a scenario where you must use gzip. For large collections of files, wrapping normal gzip with GNU Parallel would be faster. In scenarios where you control both compression and decompression, you'd be better off picking a more modern compression algorithm than gzip. ZStandard is almost always the right choice, but this benchmark is a great resource for comparing other options: https://quixdb.github.io/squash-benchmark/
pbzip2: https://github.com/ruanhuabin/pbzip2
plzip: https://www.nongnu.org/lzip/plzip.html
And possibly the cleverest of the parallel compressors, tarlz, which, while still being backwards compatible with tar, also allows parallel decompression, something none of the others can do: https://www.nongnu.org/lzip/tarlz.html
https://github.com/ruanhuabin/pbzip2/blob/master/pbzip2.cpp#...
Zstd also has experimental code in the `contrib` dir for parallel (and, more importantly, seekable) decompression: https://github.com/facebook/zstd/issues/395
Newer compression formats have multiple streams that can be decompressed in parallel, or have blocks that are compressed independently without dependencies (bzip2 can be decompressed in parallel due to independent blocks).
Pigz does not implement parallel decompression, but pigz-compressed files could, in principle, be decompressed in parallel. I assume there's not much urgency for this because gzip decompression is fast enough: >3x faster than compression and >10x faster than bzip2 decompression on default settings. (See: https://quixdb.github.io/squash-benchmark/ )