gzip, gunzip, bzip2, bunzip2, compress, uncompress, zip, unzip
– compress and expand data|
gzip [–cvD[1–9]] [file ...] |
gunzip [–ctTvD] [file ...]
bzip2 [–cvD[1–9]] [file ...]
bunzip2 [–cvD] [file ...]
compress [ –cv ] [ file ... ]
uncompress [ –cv ] [ file ... ]
zip [–avD[1–9]] [–f zipfile] file [...]
unzip [–cistTvD] [–f zipfile] [file ...]
Gzip encodes files with a hybrid Lempel–Ziv 1977 and Huffman compression
algorithm known as deflate. Most of the time, the resulting file
is smaller, and will never be much bigger. Output files are named
by taking the last path element of each file argument and appending
.gz; if the resulting name ends with
.tar.gz, it is converted to .tgz instead. Gunzip reverses the
process. Its output files are named by taking the last path element
of each file argument, converting .tgz to .tar.gz, and stripping
any .gz; the resulting name must be different from the original
Bzip2 and bunzip2 are similar in interface to gzip and gunzip, but use a modified Burrows–Wheeler block sorting compression algorithm. The default suffix for output files is .bz2, with .tar.bz2 becoming .tbz. Bunzip2 recognizes the extension .tbz2 as a synonym for .tbz.
Compress and uncompress are similar in interface to gzip and gunzip, but use the Lempel–Ziv–Welch compression algorithm. The default suffix for output files is .Z. Compress is one of the oldest widespread Unix compression programs.
Zip encodes the named files and places the results into the archive zipfile, or the standard output if no file is given. Unzip extracts files from an archive created by zip. If no files are named as arguments, all of files in the archive are extracted. A directory's name implies all recursively contained files and subdirectories. Zip is the de facto standard for compression on Microsoft operating systems.
None of these programs removes the original files. If the process fails, the faulty output files are removed.
The options are:
"A Technique for High Performance Data Compression", Terry A. Welch, IEEE Computer, vol. 17, no. 6 (June 1984), pp. 8–19.
|Unzip can only extract files which are uncompressed or compressed with the deflate compression scheme. Recent zip files fall into this category. Very recent zip files may have tables of contents that unzip cannot read. Such files are still readable by invoking unzip with the –s option.|