Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Gzip
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== File format == {{Infobox file format | name = gzip (file format) | extension = .gz | mime = application/gzip<ref>{{cite IETF|title=The 'application/zlib' and 'application/gzip' Media Types|rfc=6713|publisher=Internet Engineering Task Force|access-date=2014-03-01}}</ref> | uniform type = org.gnu.gnu-zip-archive | magic = <code>1f 8b</code> | owner = Jean-loup Gailly and Mark Adler | genre = [[Data compression]] | url = {{URL|http://gzip.org}} (obsolete) | open = Yes }} gzip is based on the [[DEFLATE]] algorithm, which is a combination of [[LZ77 and LZ78|LZ77]] and [[Huffman coding]]. DEFLATE was intended as a replacement for [[LZW]] and other [[patent]]-encumbered [[data compression]] [[algorithm]]s which, at the time, limited the usability of the [[compress]] utility and other popular archivers. "gzip" is often also used to refer to the gzip file format, which is: * a 10-byte header, containing a [[magic number (programming)|magic number]] (<code>1f 8b</code>), the compression method (<code>08</code> for DEFLATE), 1-byte of header flags, a 4-byte timestamp, compression flags and the operating system ID. * optional extra headers as allowed by the header flags, including the original filename, a comment field, an "extra" field, and the lower half of a [[CRC-32]] checksum for the header section.<ref>{{Cite web |last=Deutsch |first=L. Peter |date=May 1996 |title=GZIP file format specification version 4.3 |url=https://tools.ietf.org/html/rfc1952.html |journal= |language=en |publisher=Internet Engineering Task Force |doi=10.17487/RFC1952 |access-date=2019-07-23}}</ref> * a body, containing a DEFLATE-compressed [[Payload (computing)|payload]] * an 8-byte trailer, containing a [[Cyclic redundancy check|CRC-32]] checksum and the length of the original uncompressed data, modulo 2<sup>32</sup>.<ref>{{cite web|author1=Jean-loup Gailly|title=GNU Gzip|url=https://www.gnu.org/software/gzip/manual/gzip.html#index-options-4|website=Gnu.org|access-date=11 October 2015|archive-date=15 October 2015|archive-url=https://web.archive.org/web/20151015064748/http://www.gnu.org/software/gzip/manual/gzip.html#index-options-4|url-status=live}}</ref> [[File:Targzip.svg|thumb|gzip can be combined with the [[tar (file format)|tar]] program to compress multiple files.]] Although its file format also allows for multiple such streams to be [[Concatenation|concatenated]] (gzipped files are simply decompressed concatenated as if they were originally one file),<ref>{{cite web| title=GNU Gzip: Advanced usage| url=https://www.gnu.org/software/gzip/manual/html_node/Advanced-usage.html| website=Gnu.org| access-date=2012-11-28| archive-date=24 December 2012| archive-url=https://web.archive.org/web/20121224211417/https://www.gnu.org/software/gzip/manual/html_node/Advanced-usage.html| url-status=live}}</ref> gzip is normally used to compress just single files.<ref>{{cite web| title=Can gzip compress several files into a single archive?| url=http://www.gzip.org/#faq16|website=Gnu.org| access-date=2010-01-27 |archive-url=https://web.archive.org/web/20100722004012/http://www.gzip.org/#faq16 |archive-date=2010-07-22}}</ref> Compressed archives are typically created by assembling collections of files into a single [[tar (file format)|tar]] archive (also called [[tar (file format)|tarball]]),<ref>{{cite web|title=tarball, The Jargon File, version 4.4.7|url=http://www.catb.org/jargon/html/T/tarball.html|website=Catb.org|access-date=2010-01-27|archive-date=20 March 2017|archive-url=https://web.archive.org/web/20170320183848/http://www.catb.org/jargon/html/T/tarball.html|url-status=live}}</ref> and then compressing that archive with gzip. The final compressed file usually has the extension {{mono|.tar.gz}} or {{mono|.tgz}}. gzip is not to be confused with the [[ZIP (file format)|ZIP]] archive format, which also uses [[Deflate|DEFLATE]]. The ZIP format can hold collections of files without an external archiver, but is less compact than compressed [[tar (computing)|tarballs]] holding the same data, because it compresses files individually and cannot take advantage of redundancy between files ([[solid compression]]). The gzip file format is also not to be confused with that of the compress utility, based on LZW, with extension {{mono|.Z}}; however, the gunzip utility is able to decompress .Z files.<ref>{{cite web | title=GNU Gzip | website=The GNU Operating System and the Free Software Movement | date=2023-02-05 | url=https://www.gnu.org/software/gzip/manual/gzip.html | access-date=2024-04-03 |quote=gunzip can currently decompress files created by gzip, zip, compress or pack. The detection of the input format is automatic. }}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Gzip
(section)
Add topic