I sell songs hosted in S3. People select them and they can download, but if they buy the entire CD, they can download it as a zip file. The problem is that i have to create the zip file on the fly, which is very slow. I am using the Zip Library, adding files from string with file get contents and after that (which may take its time), the user client stars the download, which is a lot of time. Is there another way to provide it faster, maybe with some other libraries?
Here are some helpful links that may provide some insight as to how to do this better:
LAMP: How to create .Zip of large files for the user on the fly, without disk/CPU thrashing
Create the zip file once, preferably when you put together the tracks, and upload it along with the individual tracks. No need to overcomplicate things.