GZ to TAR
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 TAR around it.
One file in, one file out, with the tar wrapper round it.
A tar records a name, a size and permission bits for each file it holds. A .gz records none of those; it has one optional field for the original filename and nothing else. So the tar that comes out carries the name recovered from the header where there is one, the current date, and default permissions — because there is nothing in the source to copy them from.
How this works, and why nothing is fetched
Your browser already knows how to un-gzip, because it needs to for web pages, and this page reaches that through DecompressionStream. What it then writes — a ZIP directory or a tar header — is a byte layout rather than an algorithm, so it is written outright. Nothing is fetched and nothing is installed.
A .gz is not an archive, and does not always know the name
gzip compresses one stream. It keeps no
list of contents, no folders, no sizes and no permissions — there is
nowhere in the format to put them. A file that unpacks to several files is
a .tar.gz: a tar, which is an archive, that was then
gzipped. If that is what you have, the tar.gz
pages are the ones that will list your files.
The name is the part that catches people. The gzip
header has one optional field for the original filename.
Most tools fill it in; some do not, and anything gzipped as it is being
written cannot. When it is missing there is nothing left to go on but the
name of the .gz itself with the extension removed —
which is why data.gz comes out as data, with the
.txt somebody was expecting nowhere to be found. Both cases
are handled here: the header is read when it is there, and the fallback is
said on screen rather than presented as fact.
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
- GZ to ZIP — what everything opens without being asked twice
- GZ to TAR.GZ — the Unix default, small and lossless
- JSON to CSV — for the data inside them