.tgz File Extension
.tgz file contains, how to open and extract it, how Poly supports it, and when another archive format may work better. File extension details for .tgz
Storage Only| File type | Gzip-compressed TAR archive |
|---|---|
| MIME type | |
| Encoding | Binary TAR archive wrapped in a lossless Gzip stream |
| Operating systems | Windows, macOS, Linux, Unix |
| Opens with | GNU tar, 7-Zip, Apple Archive Utility, WinRAR |
| Poly support | Yes. Poly stores, syncs, shares, versions, and downloads .tgz files. |
| Indexed by Poly | Partial. Poly indexes the filename and ordinary file properties, not the compressed archive contents. |
| Preview in Poly | No. Download the file to inspect or extract it with an archive utility. |
| Poly agent | No. The Poly agent cannot read files inside the compressed archive. |
What kind of file is a .tgz?
A .tgz file is normally a TAR archive compressed with Gzip. It is a compact spelling of .tar.gz. TAR first bundles files, directories, and metadata into one stream; Gzip then compresses that stream losslessly.1
The appropriate media type for the outer stream is usually application/gzip, although its IETF registration lists .gz, not .tgz, as the file extension.2 A genuine Gzip member begins with magic bytes 1F 8B; the common third byte 08 identifies DEFLATE compression. After decompression, a normal .tgz payload should contain a valid TAR archive.3
archive.zip, archive.tar, or another file to archive.tgz does not convert it. Check the Gzip signature and let an archive tool validate both layers.How do I open a .tgz on my computer?
- On Windows, use the built-in
tarcommand or an archive app such as 7-Zip. - On macOS, double-click the file to try Archive Utility, or use
tarin Terminal. - On Linux and Unix, use GNU tar or a desktop archive manager.
GNU tar recognizes .tgz as Gzip-compressed TAR and can inspect or extract it directly.1 List an unfamiliar archive before unpacking it:
tar -tzf package.tgz
Then extract it into a new, empty directory. Review member paths for absolute names, .. parent references, symbolic links, device nodes, and unexpected executables. GNU tar recommends isolating untrusted archives because unsafe paths and links can overwrite files outside the intended location.4
Poly support for .tgz
Poly stores, syncs, shares, versions, downloads, and finds .tgz files by name. Poly does not currently infer Gzip from the .tgz suffix, decompress either layer, preview the archive, index member names or contents, or give the Poly agent access to files inside it.
Download the archive and extract it with a trusted local utility when you need its contents. Add the extracted files to Poly separately to receive the preview, search, metadata, and agent features available for their formats.
History of .tgz
Jean-loup Gailly wrote the original GNU gzip program, with decompression code by Mark Adler. The project dates to 1992 and was developed as a free replacement for the older Unix compress utility.5 RFC 1952 documented the Gzip file format in 1996, and RFC 6713 registered application/gzip in 2012.23
The .tgz convention combines the roles of TAR and Gzip in a short suffix. GNU gzip recognizes it as shorthand for .tar.gz and can use .tgz when compressing a filename ending in .tar would otherwise require truncation. GNU tar also maps .tgz to Gzip for automatic compression selection.16
Working with .tgz and alternatives
| Format | Good fit | Main tradeoff |
|---|---|---|
.tgz | Compact, familiar Unix tarball name | .tar.gz makes both layers more explicit |
.tar.gz | Broadly compatible source releases and backups | Same TAR and Gzip layers, with a longer name |
.tar.xz | Smaller distribution archives in many workflows | Slower compression and less universal support |
.tar.zst | Fast modern compression and decompression | Older tools may need Zstandard installed |
| ZIP | Familiar cross-platform sharing and per-file access | Different archive model and Unix metadata handling |
Gzip includes a CRC-32 for accidental-corruption checks, but it does not authenticate the archive. A small compressed file can also expand substantially. Apply storage and time limits, inspect TAR members before extraction, and verify a trusted digest or signature when provenance matters.23
Converting to ZIP or another tarball requires decompressing or extracting and then creating a new archive. Changing only the suffix changes no bytes.
Footnotes
- Free Software Foundation. GNU tar: Creating and Reading Compressed Archives. GNU tar documents compressed TAR handling and maps
.tgzto Gzip. ↩ ↩2 ↩3 - Internet Engineering Task Force. RFC 6713: The
application/zlibandapplication/gzipMedia Types. The registration specifiesapplication/gzip, the.gzextension, and security considerations. ↩ ↩2 ↩3 - L. Peter Deutsch. RFC 1952: GZIP File Format Specification Version 4.3. The specification defines Gzip magic bytes, DEFLATE method identifier, trailer, and CRC behavior. ↩ ↩2 ↩3
- Free Software Foundation. GNU tar: Integrity. The guidance covers isolated extraction, links, absolute names, and overwrites. ↩
- Free Software Foundation. GNU Gzip. The GNU project credits Gailly and Adler and explains Gzip's replacement of Unix Compress. ↩
- Free Software Foundation. GNU Gzip Manual: Overview. The manual documents
.tgzas shorthand for.tar.gzand its filename-truncation behavior. ↩