node.jsexpresszipjszipnode-archiver

Zip Create Process with Node Express of large ZIP packages


Goal

We standing up a low volume site, where users (browser client) will select image files (284 KB per file) and then request a Node Express Server to bundle them into a ZIP for download to the web client.

Issues & Design Constraints

Question

We assume that running 7zip as a child process is bad, since we would not get any running status as to how many of the 258KB files had been added to the ZIP.

So which of the following packages are very Node/ExpressJS friendly packages given the design constraints/goals listed above?

What I am seeing above is that most packages first collect the files, and then finalize them to memory and then pipe them to the http request (probably not good for 5GB of data or am I missing something). Some seem to be able to use disk, but the question will be does one get update events as each file is added?

Others seem to be fully async and I don't see how you would get a running progress value as each file added to the ZIP package.


Solution

  • Of the packages listed above. Most were not appropriate

    We chose Archiver, since it had most of the features desired:

    As for the 7zip solution. We tend not to like reading the entrails of a standard output stream from a spawned child process.