Gzip MIME Type

Learn what application/gzip means, how to identify and decompress Gzip data, and how Poly handles .gz files.

MIME type details for application/gzip

In active use
MIME typeapplication/gzip
Extensions
.gz.tgz
Magic number1F 8B
First standardized1992
Created byJean-loup Gailly and Mark Adler
Browser supportNo native file preview
Example applicationsGNU gzip, 7-Zip, GNU tar
Poly supportPartial. Poly recognizes .gz as application/gzip and stores, syncs, shares, and versions the file, but does not decompress it. The .tgz shorthand is not recognized as Gzip.
Indexed by PolyPartial. Poly indexes the Gzip file's name and ordinary file properties, but not the compressed data or any tar members.
Preview in PolyNo. Poly has no in-app Gzip decompressor or archive browser; download the file and open it with a compatible utility.
Poly agentNo. The Poly agent cannot read or reason about content inside a Gzip stream.

What does application/gzip mean?

The application/gzip media type identifies a byte stream compressed in the Gzip file format. Gzip is lossless, so successful decompression reproduces the original bytes. It wraps DEFLATE-compressed data in a header and trailer that can carry details such as an original filename and modification time, plus checksums for detecting accidental corruption.12

The registered extension is .gz. A .tgz filename conventionally means .tar.gz: a TAR archive compressed as one Gzip stream.3

Gzip is a compression format, not a general multi-file archive format. TAR supplies the member names, directory structure, permissions, and other archive metadata in a .tar.gz or .tgz file.

Where did Gzip come from?

Jean-loup Gailly designed the Gzip format and wrote the original GNU compression program. Mark Adler wrote the decompression code and worked with Gailly on the related software. The GNU manual dates the project documentation to 1992, while RFC 1952 formally documented Gzip file format version 4.3 in May 1996.24

Gzip was developed for the GNU project as a replacement for the Unix compress utility, whose LZW algorithm was covered by patents at the time. Gzip instead uses DEFLATE, which combines LZ77-style back-references with Huffman coding.45

The IETF registered application/gzip in 2012. Earlier software used informal names including application/x-gzip, application/gzip-compressed, and application/x-gunzip. RFC 6713 says new applications should use application/gzip instead.1

How do you identify a Gzip file?

A Gzip member starts with the two bytes 1F 8B. The next byte identifies the compression method. For ordinary Gzip data it is 08, meaning DEFLATE, so a common opening is:2

1F 8B 08 ...

The header can also contain optional fields such as an original filename, a comment, and extra application-specific data. The trailer stores a CRC-32 of the uncompressed data and the uncompressed size modulo 2^32.2

The signature is useful for identification, but it is not proof that the complete stream is valid. GNU gzip can test the data without saving decompressed output:

gzip --test download.gz

A successful checksum test detects many forms of accidental damage. It is not a digital signature and does not establish who created the file or whether the decompressed content is safe.

How do you open an application/gzip file?

Web browsers normally download a Gzip file instead of presenting its decompressed contents as a document. This differs from HTTP Content-Encoding: gzip, where the browser transparently decodes a compressed representation before handing it to the page.

Common local tools include:

  • GNU gzip, gunzip, and zcat for compressing, decompressing, and streaming a single payload.
  • GNU tar for listing or extracting .tar.gz and .tgz archives.3
  • 7-Zip, which supports Gzip extraction and creation.6

To preserve the compressed file while writing the decompressed result:

gzip -dk report.csv.gz

For a TAR archive, inspect the member list before extraction:

tar -tzf source.tar.gz
tar -xzf source.tar.gz -C empty-directory

Do not use unzip for a normal .gz file. ZIP and Gzip can both use DEFLATE internally, but their containers, metadata, and signatures are different.

Support in Poly

Poly recognizes the .gz extension as application/gzip and classifies the file as an archive. It can store, sync, share, version, download, and find the file by name.

Poly treats the compressed bytes as opaque:

  • It does not decompress the Gzip stream or inspect a TAR archive inside it.
  • It does not index decompressed text, tar member names, or member metadata.
  • It does not generate a thumbnail or offer an in-app preview.
  • The Poly agent cannot read or reason about the compressed contents.

Poly's current filename mapping recognizes .gz, but not the .tgz shorthand. A file named backup.tar.gz is recognized because its final extension is .gz. A file named backup.tgz is not classified as Gzip from its extension.

Download and decompress the file with a trusted utility when you need its contents. Adding the decompressed output to Poly separately allows that file to use the preview and indexing pipeline for its own format.

Gzip versus tar, ZIP, and zlib

These related names describe different layers:

FormatTypical extensionWhat it provides
Gzip.gzCompression for a byte stream, plus a small header and integrity trailer
TAR with Gzip.tar.gz or .tgzA TAR member archive wrapped in Gzip compression
ZIP.zipIts own multi-file archive structure with per-entry compression
zlibNo standard file extensionA compact DEFLATE stream wrapper commonly embedded in other formats

Both Gzip and zlib use DEFLATE, but they have different wrappers and are not interchangeable byte for byte. RFC 6713 describes zlib as a stream format and Gzip as adding header and trailer fields more appropriate for a file format.1

A Gzip file can contain multiple concatenated Gzip members. A compliant decompressor processes the members in sequence and concatenates their uncompressed results.2 This still does not create a searchable archive directory like ZIP or tar.

Safety and interoperability

Treat the decompressed result as untrusted input. RFC 6713 notes that Gzip can carry arbitrary binary data, including hostile executable code, and that malformed inputs can put unexpected values in header fields.1

Small compressed inputs can also expand into very large outputs. Apply storage, memory, and time limits when decompressing data from an untrusted source. For .tar.gz files, inspect member paths and links before extraction, and extract into a new directory to reduce the risk from absolute paths, parent-directory references, or unexpected overwrites.

Gzip's optional metadata can affect reproducible builds. The header may record an original filename and modification time. GNU gzip provides options to omit those fields when deterministic output matters.25

Footnotes

  1. Internet Engineering Task Force. RFC 6713: The application/zlib and application/gzip Media Types. The registration documents the canonical media type, extension, older informal names, and security considerations. 2 3 4
  2. L. Peter Deutsch. RFC 1952: GZIP File Format Specification Version 4.3. The specification defines the header, magic bytes, optional fields, DEFLATE method identifier, trailer, concatenated members, and CRC behavior. 2 3 4 5 6
  3. Free Software Foundation. Creating and Reading Compressed Archives. The GNU tar manual documents .tar.gz creation, recognition, listing, and extraction. 2
  4. Free Software Foundation. GNU Gzip. The GNU project credits Jean-loup Gailly with the original program and Mark Adler with its decompression part. 2
  5. Free Software Foundation. GNU Gzip Manual. The manual documents the .gz naming convention, algorithm, metadata behavior, commands, and project-era copyright dates. 2
  6. 7-Zip. 7-Zip. The official feature list includes Gzip among supported packing and unpacking formats.
© Poly Corp. 2026