.gz File Extension
.gz file contains, how to open and verify Gzip data, how Poly supports it, and when to use TAR or another format. File extension details for .gz
Storage Only| File type | Gzip compressed file |
|---|---|
| MIME type | |
| Encoding | Binary Gzip wrapper containing DEFLATE-compressed data |
| Operating systems | Windows, macOS, Linux |
| Opens with | GNU gzip, GNU tar, 7-Zip, Archive Utility |
| Poly support | Yes. Poly stores, syncs, shares, versions, and downloads GZ files. |
| Indexed by Poly | Partial. Poly indexes the filename and basic file properties, not compressed contents. |
| Preview in Poly | No. Download the file to decompress or inspect it with a compatible utility. |
| Poly agent | No. The Poly agent cannot read data inside a Gzip stream. |
What kind of file is a .gz?
A .gz file is a byte stream compressed with Gzip. It normally uses the application/gzip MIME type. Gzip is lossless, so successful decompression reproduces the original bytes. The format wraps DEFLATE-compressed data with a header and an integrity trailer.12
Gzip compresses a stream rather than organizing a collection of files. A name such as backup.tar.gz usually means that TAR first bundled files and directories, then Gzip compressed that TAR stream.
A Gzip member starts with the magic bytes 1F 8B. The usual next byte is 08, which identifies DEFLATE. Check the signature and validate the complete stream instead of trusting its name. Renaming a ZIP or TAR file to .gz does not convert it.
How do I open a .gz on my computer?
- On Windows, use 7-Zip or a command-line TAR tool.
- On macOS, double-click the file to try Archive Utility, or use
gzipandtarin Terminal. - On Linux, use
gzip,gunzip, or a desktop archive manager.
For a single compressed file, this keeps the .gz while writing the decompressed copy:
gzip -dk report.csv.gz
For a tarball, list its members before extracting it:
tar -tzf backup.tar.gz
GNU tar documents direct creation, listing, and extraction of Gzip-compressed TAR archives. 7-Zip also supports Gzip packing and unpacking.34
Poly support for .gz
Poly recognizes .gz as Gzip and lets you store, sync, share, version, download, and find the file by name. It does not decompress the stream, index the uncompressed data or TAR members, generate a thumbnail, or provide an in-app archive preview. The Poly agent cannot read the compressed contents.
If you need preview, content search, or agent access, decompress the file with a trusted utility and add the resulting supported files to Poly separately.
History of .gz
Jean-loup Gailly wrote the original GNU gzip program, and Mark Adler wrote its decompression code. The project dates to 1992. It was designed as a free replacement for the older Unix compress utility, whose LZW method was affected by patents at the time.5
RFC 1952 documented Gzip file format version 4.3 in May 1996. The IETF registered application/gzip in 2012 and specified .gz as its file extension, replacing informal media types such as application/x-gzip for new applications.12
Working with .gz and alternatives
Choose the layer that matches the job:
| Format | Best fit | Important distinction |
|---|---|---|
| Gzip | Compressing one byte stream | No archive directory |
| TAR + Gzip | Unix backups and source releases | TAR stores members; Gzip compresses the stream |
| ZIP | Portable multi-file archives | Own directory structure and per-entry compression |
| XZ or Zstandard | Workflows prioritizing stronger compression or speed | Different formats and tool support |
.gz can expand into a very large output, and its payload can contain unsafe data. Limit resource use, inspect TAR member paths and links, and extract untrusted archives into a new directory.1The Gzip trailer stores a CRC-32 and the uncompressed size modulo 2^32. gzip --test download.gz checks stream integrity without saving the output, but it does not authenticate the file or prove that its contents are safe.2
Footnotes
- Internet Engineering Task Force. RFC 6713: The
application/zlibandapplication/gzipMedia Types. The registration documents the media type,.gzextension, and security considerations. ↩ ↩2 ↩3 - L. Peter Deutsch. RFC 1952: GZIP File Format Specification Version 4.3. The specification defines Gzip members, magic bytes, DEFLATE identifier, metadata, CRC, and length trailer. ↩ ↩2 ↩3
- Free Software Foundation. Creating and Reading Compressed Archives. The GNU tar manual documents Gzip-compressed TAR archives. ↩
- 7-Zip. 7-Zip. The official feature list includes Gzip packing and unpacking. ↩
- Free Software Foundation. GNU Gzip. The GNU project credits Gailly and Adler and explains Gzip's replacement of Unix Compress. ↩