I would like to implement feature like GMail's "get all attachments as zipped file".
Is there a way to select multiple files on server, zip them and on-the-fly pass-through to browser? (something similar to PHP's function readfile
used for attachments streaming)
[EDIT]
It seems you misunderstood my intentions, all given examples require to create and close archive before its being sent, I want to stream while archive is created.
Something like unix command (from zip manual):
zip -r - . | dd of=/dev/nrst0 obs=16k
[EDIT2]
I have tons of ~2MB files (> 100) to serve, waiting for creation of tmp zip file forces to implement queuing mechanisms and takes storage space... If it can be done through stream/pipe directly to browser, why I should write tmp zip in filesyetm?