What is a GZ file?
Gnu Zip
- Developed By
- The GNU Project (Jean-loup Gailly & Mark Adler)
- Initial Release
- 1992
- MIME Type
- application/gzip
A GZ file is a compressed archive generated by the gzip (GNU zip) utility, originally developed by Jean-loup Gailly and Mark Adler in 1992 as a free software replacement for the LZW-patented Unix compress program. The format utilizes the DEFLATE algorithm, which combines LZ77 compression and Huffman coding to reduce file size losslessly. Defined by IETF RFC 1952, the GZ file structure includes a 10-byte header containing a magic number (0x1F 0x8B), compression method flags, and the original filename, followed by the compressed data stream and a CRC-32 checksum footer for error detection. Unlike ZIP archives, GZ is typically used to compress a single file or stream; multiple files are usually archived into a TAR file before compression, resulting in a .tar.gz extension.
How to open a GZ file
GZ files enjoy native support on Unix-like operating systems, including Linux and macOS, where they can be decompressed via the terminal using the gunzip command or opened with the built-in Archive Utility. On Microsoft Windows, native support is limited, necessitating third-party file archivers such as 7-Zip, WinRAR, or PeaZip to extract contents. Since GZ compresses a single bitstream, if the contained file is a TAR archive, users must perform a second extraction step to access the individual files within the resulting directory.