TAR.Z to ZIP

Nothing you choose here leaves your browser, and nothing is downloaded to make it work — not a library, not a compression module, nothing. Your browser already knows how to deflate and gzip; this page writes the ZIP around it.

…or drop one anywhere on this page.

A tar.Z is a tar inside the old Unix compressor. This unpacks both.

gzip replaced compress around 1993, so a .Z is usually thirty years old and nothing on Windows will open one. It is compressed with LZW, which is the one algorithm your browser does not have — gzip and deflate are built in, LZW never will be — so this page carries about a hundred lines of decompressor. The patent everybody avoided it for expired in 2003. What is inside is an ordinary tar, so you get the whole list of files, and the ZIP is what Windows opens without being asked twice. .taz and .tz are the same thing under the short names DOS needed, and are taken here too.

How this works, and why nothing is fetched

This is the one page here that carries a decompressor rather than borrowing your browser's. LZW is not in DecompressionStream and never will be, so about a hundred lines of it ship with the page — written, and then checked by building .Z files and asking GNU gunzip whether they were real ones. Nothing is fetched and nothing is installed; the code is part of the page you already loaded.

The one algorithm your browser does not have

Everything else this site unpacks leans on the browser. gzip and deflate are in DecompressionStream because a browser needs them to load web pages at all, and a ZIP is deflate with a directory bolted on. LZW is not in there, and will not be: it belongs to a format nothing has written since the early nineties.

So this page carries the decompressor — about a hundred lines, part of the page you have already loaded. Nothing is fetched when you choose a file. The patent that made everyone avoid LZW expired in 2003.

And the thing that makes it worth saying how this was checked

compress writes its codes in groups of eight. When the codes get wider — they start at nine bits and grow — the rest of the current group is padded out so the next one starts on a byte boundary. A decoder that just reads the next nine, then ten, then eleven bits is correct right up to the first width change and produces confident rubbish after it.

That is not a hypothetical. The first version written here changed width one code too early. GNU gunzip read the result, reported success, and handed back three and a half kilobytes of nonsense — no error, no warning, exit code nought. Which is why every test file is built, handed to gunzip, and only used once gunzip agrees it is a real .Z.

What it will not do

It will not open a RAR, and nothing ever writes one: RARLAB's licence forbids using their code to re-create the RAR algorithm, which is proprietary. That is a legal restriction and not a difficulty. It will not open a 7z, bzip2 or xz either — those need compressors your browser does not have, so supporting them would mean shipping one, which is the thing this page avoids. It says which of these it is looking at rather than just refusing.

It does not open password-protected archives, and it says so per file rather than failing silently. It reads plain ZIPs rather than ZIP64, so an archive over 4 GB or with more than 65,535 files is refused with that reason given.

Where to go next