1

I am trying to dynamically serve Zip files, I would like to unzip a file 1x on script launch, and on every request, include a string in a text file and stream the whole zip file to the client.

To handle decent sized concurrency my best solution so far has been to use filesystem Zip and Unzip in a Ramdisk...

It seems like it should be easy to buffer the file into memory, and stream it out per request with modified contents.

Lerchmo
  • 189
  • 1
  • 12
  • The question is, How do I unzip a file into memory, and stream it out (with modifications) to the client. Like edit a text file in a zip, than serve the zip. Without a bunch of disk activity... – Lerchmo Jul 26 '11 at 18:14
  • what are you using within Node.js for the zip/unzip logic? – Cheeso Aug 03 '11 at 14:10

1 Answers1

0

You could use memcached to store the file. Memcached stores any data in memory and serves faster.

Poomalairaj
  • 4,888
  • 3
  • 23
  • 27
  • I could also just store it as a variable in the node.js process... but how to modify that and buffer it out? – Lerchmo Jul 26 '11 at 18:35