You are right with your assumption. Loading the file at once was the reason.
Define "better".
You could zip the file "on the fly" if it's not already zipped.
Update: (Thanks to ikegami) You could also use read to read chunks of the file into a buffer.
In reply to Re: Improving a File Download Script
by Skeeve
in thread Improving a File Download Script
by awohld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |