caching - How to quickly zip large files in PHP -


I wrote a PHP script to pack dynamically selected files in the zip file by the client and downloads. It works well, except that when the number of files is large (more than 50000), the dialog box takes a lot of time to download to the client side.

I thought about it to improve using cash (has not changed very often these files), but because the files have been selected solely determined by the user, and thousands to choose Combinations are combinations, this combination is very hard to cache. I first thought about generating zip archives for personal files, and then combining zip files on-the-fly. But I did not find a way to insert ZIP files into PHP. Another way I can think of sending a zip file (ie, reading) at the same time as the creation of it. I do not even know whether it is supported or not.

If someone can help me on this, then I appreciate your help.

The use of the combination of the extended response to Mike Sherov, Tar and Gzip / Zip try. Individually the pre-compressed using Gzip / Zip all the files, then the client select them, then you have to enter a terrace with those files such benefits still compression and download a file Can achieve simplicity, but nobody in the real-time overheads associated with compressing large files and delays.


Comments