Convert Z to TAR.GZ Online (The Actual Handoff From Compress to Gzip)
The specific technical and legal reasons gzip replaced Unix compress as the default, told through the two algorithms' real differences rather than a vague "gzip is newer."
- Add a file Choose or drop it here
- Pick the format Change it whenever needed
- Download the result After conversion completes
The Exact Format Handoff This Conversion Represents
Converting .tar.Z to .tar.gz is a direct recreation of the actual historical transition the Unix world went through: compress, implemented by Spencer Thomas in 1984 and finalized as version 4.0 in 1985 using LZW compression, was the standard Unix compression tool until gzip, built on the DEFLATE algorithm and specified in RFC 1952 in the early-to-mid 1990s, replaced it as the default almost everywhere. A .tar.Z file and a .tar.gz file typically hold identical archive contents, bundled by TAR the same way, differing only in which of these two algorithms compressed the result.
This conversion decompresses the older LZW layer to recover the plain tarball, then recompresses that tarball with gzip's DEFLATE algorithm instead. The files, folders, and Unix permission bits inside pass through both steps completely unchanged — only the compression algorithm applied to the resulting bytes is different.
For anyone specifically interested in software history rather than just getting a smaller file, this particular conversion is worth doing consciously rather than as a purely mechanical step, since it walks through the exact same transition countless real Unix systems went through gradually over the course of the 1990s, one file and one script at a time, as administrators replaced compress-based tooling with gzip wherever it made sense to.
LZW Dictionary Substitution Against LZ77-Plus-Huffman DEFLATE
Compress's LZW builds a dictionary of repeated byte sequences on the fly and replaces them with progressively wider numeric codes, starting at 9 bits and growing to a configurable maximum, typically 16 bits, as the dictionary fills. DEFLATE, gzip's algorithm, works differently: it combines LZ77-style back-referencing within a 32 KB sliding window with Huffman coding as a separate final entropy-coding stage, whereas classic LZW substitution in compress generally skips that kind of dedicated entropy-coding pass on its dictionary codes.
This extra Huffman stage is one concrete, technical reason DEFLATE generally compresses tighter than LZW on the same input: gzip squeezes additional redundancy out of the already-matched data that compress's simpler pipeline leaves behind. It's not simply that gzip is "newer and therefore better" in some vague sense — the actual algorithmic difference, an added entropy-coding step DEFLATE has and classic LZW substitution in compress doesn't, is a specific, verifiable reason for the ratio gap between the two.
Gzip's file format itself, defined in RFC 1952, also carries more metadata by default than compress's minimal header design does — including an optional original filename field, a modification timestamp, and an operating-system identifier byte recording which platform created the file, none of which compress's format ever tracked. This extra metadata is small in size but reflects a more deliberately engineered file format overall, designed with archival and cross-system interoperability more explicitly in mind than compress's original, more minimal 1984 design needed to account for.
What Actually Changes Recreating This Historical Switch
- Gain — a genuinely better compression ratio on most files: DEFLATE's added Huffman coding stage generally outperforms LZW's simpler dictionary substitution on typical data.
- Gain — a format supported virtually everywhere: gzip decoders are built into an enormous range of software, since DEFLATE also underlies ZIP and PNG, giving it far broader baseline presence than compress ever achieved.
- Lose — the specific historical character of an original .tar.Z: for archival preservation purposes, converting away from the original format changes what's actually being preserved, from a technical standpoint.
- Unchanged — every file, folder, and Unix permission bit inside: TAR's own structure passes through both algorithms untouched, since neither is aware of what it's compressing.
- Gain — freedom from any patent history at all: DEFLATE was designed patent-free from release, while LZW carried an active, enforced patent for years before it expired in 2003.
The Specific 1994 Event That Accelerated Gzip's Adoption
While gzip already compressed better than compress on most files, a separate, non-technical event pushed the Unix world toward it even faster: on December 24, 1994, Unisys, which had acquired the LZW patent through its merger with Sperry Research Center, announced it would begin collecting licensing fees from commercial software using LZW-based encoding, most visibly targeting GIF image support. Even though this announcement was aimed primarily at GIF rather than compress specifically, it made the patent risk underlying LZW impossible to ignore across the broader software industry, and Unix tooling that still defaulted to compress had every reason to finish migrating to gzip's patent-free DEFLATE well before the patent's eventual 2003 expiration.
The same December 1994 announcement is directly responsible for PNG's creation as well — Thomas Boutell proposed a royalty-free replacement image format on the comp.graphics Usenet newsgroup within about three months of Unisys's announcement — which shows how far the ripple effects of one company's patent enforcement decision spread across completely different corners of the software world, from Unix command-line tools to web image formats, all converging on the same practical response: move to compression methods free of that specific legal risk.
It's worth being precise about timing here: the LZW patent itself didn't expire until 2003, nearly a decade after the December 1994 announcement, yet gzip had already become the dominant Unix default well before that expiration date arrived. This gap between "the patent risk becomes widely known" and "the patent legally expires" is exactly why so much software migrated away from LZW-based tools years before it was strictly, legally required to — the industry acted on the risk itself, not on waiting out the calendar.
The Real Problem Behind "My Archaeology Dataset Won't Open Anymore"
A specific, documented complaint from people working with genuinely old research data or academic archives is a decompression tool that no longer ships with support for compress's LZW format at all, since some newer, security-hardened, or minimal software distributions have deliberately dropped support for older, less-used compression formats to reduce their code's attack surface. The fix reported in digital-preservation forums is installing a dedicated legacy tool like ncompress rather than assuming any general-purpose archive utility automatically covers every historical format, and treating this as a normal, expected part of working with genuinely old data rather than a sign the file itself is broken.
A second, related issue shows up specifically in automated data pipelines that were written assuming every input file would be gzip-compressed, since gzip has been the default for so long, and that fail or silently mishandle a .Z file when one unexpectedly turns up in an older batch of files mixed in with newer ones. The documented fix is having the pipeline check each file's actual magic number rather than assuming a fixed compression format based on file extension alone, since a wrongly-assumed format is a common, avoidable source of this specific class of processing error.
A third, milder issue comes up with automated file-type detection tools that identify a compressed file by its magic number rather than its extension, occasionally mislabeling an old .Z file as an unrecognized binary blob if the specific tool's signature database was never updated to include compress's magic number at all. Since this is purely a detection-tool limitation rather than anything wrong with the file, manually specifying the correct decompression tool rather than relying on automatic detection resolves it immediately.
The Format Gzip Replaced Set Beside the Format That Replaced It
| Feature | TAR.Z | TAR.GZ |
|---|---|---|
| Algorithm | LZW dictionary substitution | DEFLATE (LZ77 + Huffman) |
| Release era | 1984-1985 | Early-to-mid 1990s |
| Patent status | Patented until 2003, now expired | Patent-free by design |
| Key 1994 event affecting adoption | Unisys's Dec. 24, 1994 licensing announcement | Direct beneficiary of that same event |
| Typical compression ratio | Lower | Higher on most data |
| Current default status | Legacy, decompression-only for most tools | Still a common Unix default |
Questions About Recreating the Compress-to-Gzip Transition
Was gzip always meant to replace compress specifically?
Not explicitly at first, but its combination of better compression and patent-free status made it a natural, and eventually near-universal, replacement across the Unix world once the LZW patent situation became a real concern in the mid-1990s.
How much smaller will my file be after this conversion?
Typically noticeably smaller, since DEFLATE's added Huffman coding stage generally compresses tighter than LZW's simpler dictionary substitution on most kinds of data.
Did the Unisys patent situation actually affect Unix compress users directly?
The 1994 enforcement announcement targeted commercial GIF-supporting software most directly, but it raised general awareness of LZW's patent status across the whole software industry, giving Unix tooling built around compress an additional reason to migrate to gzip beyond compression ratio alone.
Does this conversion risk losing any actual data?
No. Both LZW and DEFLATE are lossless algorithms, so the original file content is restored exactly regardless of which one compressed it, and TAR's own structure is untouched by either.
Does gzip's file format store any extra information compress never did?
Yes. Gzip's RFC 1952 format can carry an optional original filename, a modification timestamp, and an operating-system identifier byte, none of which compress's simpler original header format ever tracked.