gzip is a compression utility designed to be a replacement for compress. It is an open source command line data stream compressor and archiver. Gzip is any of several software application used for file compression and decompression. The term usually refers to the GNU project’s implementation, “gzip” standing for GNU zip. It has been adopted by the GNU project and is now relatively popular on the Internet.
It is based on the deflate algorithm, which is a combination of lempel-Ziv(LZ77) and huffman coding. The program was created by Jean-loup gailly and Mark Adler as a free software replacement for the compress program used in early unix systems, and intended for use by the Project. Gzip 1.2.4 may crash when an input file name is too long (over 1020 characters).
The main advantages over compress are much better compression and freedom from patented algorithms. The buffer overflow may be exploited if gzip is run by a server such as an ftp server. Gzip is used to refer to the gzip file format, they are
- a 10-byte header, containing a magic number, a version number and a time stamp
- optional extra headers, such as the original file name,
- a body, containing a DEFLATE-compressed payload
- an 8-byte footer, containing a CRC 32N hecksum and the length of the original uncompressed data
Gzip is not to be confused with the ZIP archive format, which also uses DEFLATE. The ZIP format can hold collections of files without an external archiver, but is less compact than compressed tarballs holding the same data, because it compresses files individually and cannot take advantage of redundancy between files.