.Z File Extension

Learn what a .Z file contains, how to open and verify it, how Poly supports it, and which modern compression formats to consider.

File extension details for .Z

Storage Only
File typeUnix Compress file
MIME type
EncodingBinary Unix Compress stream using adaptive Lempel-Ziv-Welch coding
Operating systemsWindows, macOS, Linux, Unix
Opens withncompress, GNU gzip, GNU tar, 7-Zip
Poly supportYes. Poly stores, syncs, shares, versions, and downloads .Z files.
Indexed by PolyPartial. Poly indexes the filename and basic file properties, not the compressed payload.
Preview in PolyNo. Download the file and decompress it with a compatible utility.
Poly agentNo. The Poly agent cannot read content inside the compressed stream.

What kind of file is a .Z?

A .Z file is one data stream compressed with the historical Unix compress utility. Compress uses adaptive Lempel-Ziv-Welch coding and conventionally adds an uppercase .Z to the original filename.1 The commonly used MIME label is application/x-compress, although IANA does not register that media type.2

The stream begins with hexadecimal bytes 1F 9D. Check those bytes and attempt a full decode when a filename may be misleading. The suffix alone cannot identify or validate the contents.

A plain .Z stream holds one payload, not a directory of files. report.txt.Z normally expands to report.txt. source.tar.Z expands first to a TAR archive, which can contain multiple files.

How do I open a .Z on my computer?

  • On Windows, 7-Zip can unpack Unix Compress (Z) data.3
  • On macOS, Linux, and other Unix-like systems, ncompress provides uncompress, while GNU gzip can decode traditional .Z streams.14
  • For a .tar.Z package, GNU tar can recognize the compression and inspect or extract the TAR payload.5

Keep the compressed original and write the result to a separate file:

gzip -cd report.txt.Z > report.txt

Do not assume lowercase .z identifies the same format. Case-sensitive Unix conventions use uppercase .Z for Compress, while lowercase .z has also been used by other compression tools.

Poly support for .Z

Poly safely stores, syncs, shares, versions, downloads, and finds .Z files by filename and ordinary file properties. Poly does not currently decompress the stream, generate a thumbnail, provide an archive preview, index the payload, or make the compressed content available to the Poly agent.

If you need content search, preview, or agent access, decompress the file with a trusted local utility and add the recovered file to Poly separately. Keep the .Z original when provenance or exact preservation matters.

History of .Z

Spencer W. Thomas released the first compress implementation in July 1984. Joseph M. Orost produced portable updates, and version 4.0 entered the BSD lineage in 1985.6 The tool became common for Unix software distribution, backups, and online archives.

Patent concerns around LZW later helped motivate GNU Gzip, which uses DEFLATE instead. GNU describes gzip as a replacement for compress, and modern tools retain .Z decoding mainly for compatibility with older collections.7

Working with .Z and alternatives

Unix Compress has no checksum over the original uncompressed bytes. A successful traditional decode therefore does not prove that the result is intact.4 Verify an external digest when available, limit output size for untrusted streams, and inspect any recovered TAR member list before extraction.

FormatPractical fit
GzipBroad compatibility for single streams and tarballs
XZCompact software distribution when compression time matters less
ZstandardFast modern compression and decompression

Conversion means decompressing the .Z stream and compressing the recovered data with the chosen format. Renaming archive.Z to .gz, .xz, or .zst changes no bytes and does not convert the file.

Footnotes

  1. ncompress project. compress Manual Page. The maintained manual documents adaptive LZW coding, the .Z suffix, decompression commands, and compatibility limits. 2
  2. Internet Assigned Numbers Authority. Media Types Registry. The application registry does not include application/x-compress.
  3. 7-Zip. 7-Zip. The official format list includes Z unpacking on Windows.
  4. Free Software Foundation. GNU Gzip Manual. The manual documents .Z decoding and the Compress format's lack of a consistency check. 2
  5. Free Software Foundation. GNU tar: Creating and Reading Compressed Archives. GNU tar documents traditional Compress support and signature-based decompression.
  6. ncompress project. ncompress History. The project records the 1984 first release, portable updates, and BSD adoption.
  7. Free Software Foundation. Gzip. The GNU project explains that gzip was developed as a replacement for Compress because of LZW patents.
© Poly Corp. 2026