File types / Archives
.gz file
Gzip compressed file
- Extensions
- .gz, .gzip
- MIME type
application/gzip- Signature
1F 8Bat byte offset 0- Safety
- Low risk
What is a .gz file?
Gzip compresses a single file or stream. It is everywhere on Linux and on the web, where servers use it to shrink pages in transit.
It is usually paired with tar to hold many files, giving the familiar .tar.gz or .tgz. The signature is the two bytes 1F 8B, then a method byte, normally 08.
Used for: Compressed logs, downloads and web transfers.
How can I tell if a file is really a GZ?
Read its first bytes rather than trusting the name. A genuine GZ file has the signature 1F 8B at byte offset 0. The File Identity tool reads these bytes in your browser, so the file is never uploaded.
To compare the name against the content, use Validate Extension. To see the raw bytes, use Safe File Preview.
Is a .gz file safe to open?
Gzip only compresses; the risk lies in what the decompressed data contains.
Easy to confuse
A .tar.gz is two layers: gzip around a tar archive.