Dynamically create a large zip code to load clients

There is a project in which each user downloads a zip containing about 2 GB of data ...

The only problem is that there are a couple of very small files that need to be changed in this mailbox for each user.

Is there an elegant way to solve this problem, since it is not required that all this be in a zip code? Ideas I reviewed:

1) Pressing pending orders on the queue and processing this queue if resources are available ... processing will mean creating a new zip code for each order, and then deleting it after N days

2) Manipulating zip live in PHP somehow before sending it through the raw push type (i.e. spitting out the header and then generating data based on files + user files)

Any ideas for optimal access or memory issues that I might run into? Thank!

+5
source share
3 answers

ZIP file structure mainly:

  • A magic header that identifies the file as a ZIP archive.
  • All file data is combined together. (Individual files may be copied.)
  • An archive directory containing file metadata (names, sizes, etc.), as well as file data offset.

, ZIP- " ", , . ZIP- .

, concurrency ZIP , - .

+2

zip

  • first zip ( Gb http, scp, ftp , )
  • zip (php script) , , / .
0

PHP zip? http://php.net/zip

, , ZIP- " " . , , 2GB- , , .

0

All Articles