I didn't have room for a zip and its files, so I learned how to skip the zip
A while ago I had to unpack a 60 GB zip. The files would have fit on my laptop. The zip plus the files didn't. That's the annoying part of "download it, extract it, delete the zip". For a moment you need room for both. Usually that's fine. That day it wasn't, and I got stuck on a question: do I actually need the zip on my disk at all? Turns out, not really. The trick A zip file keeps its table of…
A 60 GB zip file once stumped the reporter, requiring room for both the zip and its contents. Curious if the zip could be skipped altogether, the reporter explored a solution. A zip file stores its table of contents at the end, called the central directory. This directory lists every file in the archive, its size and starting position.
HTTP Range requests allow servers to send just a slice of a file. By combining these, the reporter devised a method: request the zip's size, then download only the end of the file and read the table of contents. This allows downloading only the necessary files and unpacking them directly into a folder without saving the zip. The Blender 4.2 zip, for example, is 365.8 MB with 5,518 files; extracting all files required no zip space, taking 15 to 22 seconds over four runs.
The approach is simple: a Rust command line tool evolved into a Chrome extension with a helper program for Windows. The extension provides a right-click option to preview the zip's contents and choose files to download. However, the solution faces limitations: GitHub doesn't support Range requests, and certain file names or paths can cause issues.
Despite these challenges, the reporter's method saves space and simplifies downloading specific parts of a large zip file.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.