I want to be able to archive (zip, no compression needed, but that is a plus),
in memory and stream it, the problem is that I want to create an inner zip in
the zip I am streaming, like so:
Files:
a.txt, b.txt, c.txt
Stream download should look like:
my.zip {
a.txt
inner.zip {
b.txt, c.txt
}
}
Notes, I have to stream the files because I have no HD storage available and I can't have all the files in memory either (that is why I am streaming them)
Here Is a normal zip stream I managed to get working (without the inner zip streamed yet):
<?php
require 'ZipStream.php';
$zip = new ZipStream\ZipStream('my.zip');
$zip->addFileFromPath('a.txt', 'a.txt');
// I want to add inner.zip here and stream it too only from memory
$zip->finish();
Well, this kind of works. I wanted to post it although I decided to fix the problem in another way. But just for future reference this may be helpful for someone.
Plus, I know the code sucks, and is hacky - but the situation asked for it :P