Archives
Open a ZIP without downloading it
You can, and it costs kilobytes rather than the whole archive. A ZIP keeps its index, the list of everything inside, at the very end of the file. If the server allows range requests, you fetch just that last chunk and read the full file list without touching the contents. Foretaste does it in one click and shows you the byte count.
01
Why this is possible at all
A ZIP is not one compressed blob. It is a run of individually compressed files, each with a small header in front of it, and then, after all of them, a central directory: one record per file giving its name, its compressed and uncompressed size, and the byte offset where its data starts. The last thing in the file is a short end of central directory record saying how big that directory is and where it begins.
The index is at the end because ZIP was designed for archives written across several floppy disks, where the writer could not know the final offsets until it had finished. Forty years later, that decision is what lets you read the contents list of a 40 MB archive over a network without transferring 40 MB.
HTTP supplies the other half. A server that answers with
Accept-Ranges: bytes will honour a Range header and return just
the slice you asked for, with status 206 Partial Content. So: fetch the last
few kilobytes, find the end-of-directory record, learn where the directory starts, fetch
that, and you have every file name and size in the archive.
Extracting one file works the same way. The directory already told you where that file's bytes are and how many there are, so it is one more ranged request for exactly that span, and one call to the decompressor.
02
Doing it in one click
-
Allow Foretaste on the site holding the archive.
One click, one site. Foretaste asks for no site access when you install it.
-
Right-click the link and choose "Open with Foretaste".
Or click the marker beside the link. The listing appears as a folder tree, sorted folders first, with sizes rolled up from what is inside them.
-
Open or save one file from inside the archive.
Only that file is fetched, and it opens in the ordinary viewer: a PDF as a PDF, a CSV as a grid. Saving one file out of the archive is free and always available.
03
How much data it actually reads
These figures were measured against a local server that logs every request, with the reader counting the bytes it received. They are not estimates, and Foretaste reports the real number on screen each time rather than repeating these.
| Archive | What was asked for | Bytes fetched |
|---|---|---|
| 40,013,838 bytes | List all 10 entries | about 67 KB, 0.17% |
| 40,013,838 bytes | Open one small file from inside | 97 bytes |
| 13,111 bytes | List 8 entries | the whole file |
In one sentence: a 40,013,838-byte archive listed all 10 of its entries for about 67 KB, which is 0.17% of the file, and opening one small file from inside it cost 97 bytes.
The third row is the honest one. Below roughly a hundred kilobytes, picking at an archive in two or three ranged requests costs more round trips than simply taking it, so Foretaste takes it, and says so on screen rather than printing a saving it did not make. An earlier version claimed a saving on every archive and was wrong about the small ones.
The same honesty decides which formats this works on at all. The trick is a property of the
container rather than of compression: a ZIP keeps its index at the end, which is why it can
be listed from a few kilobytes. A Zstandard stream keeps no index, so .zst and
.tar.zst are read whole — Foretaste opens them, and the meter says the
whole file was read.
04
When it does not work
The server will not do ranges
Some servers send no Accept-Ranges header, and some advertise ranges and then
ignore the header and return the entire file with status 200. Generated
downloads and streamed responses often behave this way. Foretaste falls back to downloading
the archive and tells you that is what happened: you still get the listing, it just cost the
whole file.
The server refuses the request
A site protected by a WAF, or one that checks that requests came from its own pages, will
answer 403. Foretaste says so plainly and points you at saving the file
instead, which goes through the browser's own download machinery and usually gets through.
A 401 means sign in to the site in another tab and try again.
Your browser is holding the website access back
Reading another website's file from a script normally requires that website to opt in with CORS headers, which is why you cannot do this from an ordinary web page. An extension can, because your browser grants it that access when you install Foretaste. Chrome also lets you take it back afterwards - "on click", or a list of specific sites - and while it is held back Foretaste offers to save the file instead, which needs no such permission.
The archive is encrypted or damaged
A password-protected ZIP prompts you once, and the password stays in that tab, and it is never stored or sent. A wrong one says so. If the index itself is corrupt there is nothing at the end of the file to read, and Foretaste reports the failure rather than showing a half-list.
05
Doing it yourself, without an extension
Nothing here is proprietary. With curl and unzip you can do the
same thing by hand:
# 1. Does the server support ranges, and how big is the file?
curl -sI https://example.com/big.zip | grep -i 'accept-ranges\|content-length'
# 2. Fetch the last 65557 bytes: the 22-byte end-of-directory
# record, plus the 65535-byte comment it may sit behind.
curl -s -r -65557 https://example.com/big.zip -o tail.zip
# 3. List it. unzip warns about the missing beginning, then
# adjusts the offsets and prints the contents anyway.
unzip -l tail.zip If step three cannot find the index, the archive's directory is larger than the chunk you took, so fetch a bigger tail and try again. Extracting a single file by hand means reading the offset and size out of the directory and issuing a third ranged request for exactly that span, which is the point at which a tool starts to be worth having.
On the desktop, 7-Zip and unzip will list a local archive without
extracting it, but both want the whole file on disk first. The remote-listing trick is the
part that needs range requests.
Libraries that already do this
If you are reading a remote archive from a program rather than from a browser, one of these is a better answer than an extension. They are listed because the technique is older and wider than this product, and because a page about a method that pretends to be the only implementation of it is not worth trusting on anything else.
- remotezip and python-remotezip - Python. Reads single members out of a remote archive.
- cloudzip - Go. Lists and fetches specific files from archives in object storage.
- MiniZip and HttpZipStream - .NET.
- http_zip - Ruby.
The clearest written explanation of the mechanism is Listing the contents of a remote ZIP archive, without downloading the entire file, which predates this page and is worth reading on its own.
Every link in this section is to somebody else's work and none of them is affiliated with Foretaste. What none of them is, is something you can install and point at a link in a browser - which is the only reason this product exists rather than a recommendation to use one of them.
06
What about RAR, 7z and TAR?
None of them can be read this way, and it is not a gap in Foretaste. A .tar.gz
is a single gzip stream: there is no index anywhere, and you cannot decompress the end
without decompressing everything before it. 7z and RAR do keep a directory, but it is
neither always at a predictable end nor readable without the surrounding structure, so
Foretaste reads those archives whole.
So the ranged trick is for archives you open as archives. The formats that are secretly
ZIPs — .docx, .xlsx, .pptx and
.epub — use the same container, but Foretaste fetches those whole,
because a document is only worth showing once all of it has arrived. Every archive linked
from one page, listed at once, is the other way in.
The archive section of the format list
says which ones Foretaste reads whole and which it picks at.
07
Listing it is free. Digging through it is Pro.
Everything above - the ranged listing, the tree, searching the names, opening or saving any one file from inside - is free, on every archive, with no account. These three are the depth on top of it.
07
The questions people ask
Can you open a ZIP file without downloading it?
You can list one. A ZIP keeps its index - the name, size and position of every file inside - in a record at the very end of the archive, so a reader that asks the server for just that last chunk gets the whole contents list without transferring the rest. Measured over HTTP against a server that logs every request, a 40,013,838-byte archive listed all 10 of its entries for about 67 KB, which is 0.17% of the file, and opening one small file from inside it cost 97 bytes.
How do I see what is inside a ZIP before downloading it?
Right-click the link to the archive and choose Open with Foretaste. The file tree appears in a panel over the page, with a meter saying how many bytes were actually fetched. From there you can open or save any single file inside it without taking the rest.
How can I view ZIP contents online without downloading the archive?
Foretaste reads the ZIP index from its link and shows you the full list of files, their names, and their sizes, by fetching only the last few kilobytes of the archive. It works from any website that serves the file over HTTP and honours range requests. No upload is involved: the bytes go from the server directly into your browser.
Can I open a single file from inside a ZIP without downloading the whole archive?
Yes. After Foretaste lists the archive, you can click any file inside it. Foretaste fetches only that file's compressed bytes using the offset stored in the index, decompresses them in the browser, and shows you the content. A single text file out of a 40 MB archive cost 97 bytes to retrieve in testing.
How much of a ZIP do you have to read to list it?
The end of central directory record, then the central directory itself, which is roughly one short record per file. For a 40 MB archive of 10 entries that came to about 67 KB. It scales with the number of files rather than with the size of them, so a large archive of few files costs less to list than a small archive of many.
Does this work on every server?
No. It needs a server that honours HTTP range requests, and some send no Accept-Ranges header while others advertise ranges and then return the whole file anyway. When that happens Foretaste downloads the archive, still gives you the listing, and says on screen that it cost the whole file rather than printing a saving it did not make.
Can Foretaste preview RAR, 7z, and TAR archives without downloading them?
RAR and 7z are downloaded before listing, because neither format keeps a readable central directory at a predictable offset the way ZIP does. A plain .tar is streamed rather than downloaded whole, and one file inside it can be extracted in a single request. Gzip, bzip2, xz and zstandard wrappers are downloaded and decompressed before listing.
Two things follow on from this one. Why a site refuses to open a file covers the servers that answer 403 rather than a range, and what a file really is covers the other half of looking first: an archive's index gives you the names inside it before any of the contents arrive. To preview documents, PDFs or other formats, see how to preview files without downloading them.