gzip is a data compression utility maintained by the GNU project that uses Lempel-Ziv (LZ77) encoding. It is commonly paired with archivers such as tar prior to compression. Therefore, it is common to see files compressed with gzip that end in .gz, .tar.gz and .tgz extensions among others.
gzip can be considered the standard and historical GNU compressor. Although still very relevant, it is less frequently used for package distribution due to lower compression ratios compared to more modern algorithms (such as the xz format provided by app-arch/xz-utils).
USE flags for app-arch/gzip Standard GNU compressor
||disable optimized assembly code that is not PIC friendly|
||!!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically|
||Verify upstream signatures on distfiles|
emerge --ask app-arch/gzip
There are several related utilities included in with the gzip package.
Usage: gzip [OPTION]... [FILE]... Compress or uncompress FILEs (by default, compress FILES in-place). Mandatory arguments to long options are mandatory for short options too. -c, --stdout write on standard output, keep original files unchanged -d, --decompress decompress -f, --force force overwrite of output file and compress links -h, --help give this help -k, --keep keep (don't delete) input files -l, --list list compressed file contents -L, --license display software license -n, --no-name do not save or restore the original name and timestamp -N, --name save or restore the original name and timestamp -q, --quiet suppress all warnings -r, --recursive operate recursively on directories --rsyncable make rsync-friendly archive -S, --suffix=SUF use suffix SUF on compressed files --synchronous synchronous output (safer if system crashes, but slower) -t, --test test compressed file integrity -v, --verbose verbose mode -V, --version display version number -1, --fast compress faster -9, --best compress better With no FILE, or when FILE is -, read standard input. Report bugs to <email@example.com>.
gzip itself does not support parallel compression or decompression. app-arch/pigz however can be used for parallel compression by some tools, either opportunistically (e.g. Dracut), or if configured (like tar).
As a result of some tools using pigz opportunistically, simply installing pigz can be useful even without configuration. To maximize the usage of pigz, enable USE=pigz on app-alternatives/gzip which will create a symlink from gzip to pigz.
The gzip format does not lend itself to parallel decompression and the zlib/pigz maintainer has stated it is not possible for pigz to be extended for it .
emerge --ask --depclean --verbose app-arch/gzip
- Bzip2 — high-quality, patent free file compressor using the Burrows-Wheeler algorithm.
- Data compression — a list of some of the file compression options available in Gentoo Linux.
- p7zip — a command-line port of 7-Zip for POSIX compliant systems such as Unix, macOS, BeOS, and Amiga.
- tar — an archiver tool that provides the ability to create tar archives, as well as various other kinds of manipulation.
- zip — provides classic zip compression.
- app-arch/pigz - a parallel implementation of gzip.
- ↑ Mark Adler. Decompressing with pigz is not parallel, pigz bug tracker, September 22nd, 2016. Retrieved on September 29th, 2022.