If you had a listing of lots of files and directories on your webserver (Apache using indexes), you might have wanted to be able to download them all at once.
This script is made for just this. It compresses the directory on-the-fly using ZIP and sends them to the client (maximum memory usage should be about 25 MB even for large files).
Files larger than 20MB are just stored into the archive, smaller files are compressed.
It utilizes ZipStream and requires PHP 5.