So I finally got around to releasing a project I’ve had sitting around for more than a year. It’s metazip (or mod_metazip):
metazip is an Apache 2.0 module that allows you to serve dynamically-constructed, uncompressed zip files. Thus, your users can choose to download individual files or entire collections, but you don’t have to reserve disk space for both.
I originally wrote metazip to solve a problem at Archive.org. They have an amazing collection of freely-downloadable music, most of it being complete live shows of bands that allow free distribution. It’s really the logical, modern extension of the good ol’ days of Grateful Dead tape-trading. And, indeed, Archive.org has thousands of Dead shows free for the listening. Check it out!
Anyway, Archive.org allows you to download an entire show as a single .zip file. You can also select individual tracks. They employ a Perl script that dynamically creates these zip files on the fly. This seems logical, since otherwise they would consume double the disk space (and their archive is immense)!
Unfortunately, the script has a rather fatal flaw: it doesn’t support resumption of downloads, a topic of much consternation in their forums. (Also see my post on the subject, which includes a quirky workaround I concocted.) This can be mighty frustrating if your Internet connection craps out 95% of the way through a 1GB download! Most browsers and other HTTP clients support resumption, which would allow you to download that last 5% without starting over.
For more information about metazip, how it works, and how to set it up, see the metazip web site. It’s an open-source project, so feel free to contribute to its development at the SourceForge project page.