Open guoyunhe opened 1 year ago
While I would love this too, I think it is not possible.
To simplify, as I understand it, the zip format stores important metadata at the end of the file. Therefore, you need to download the whole file before you can process it. This means it requires some more significant storage which isn't compatible with the streaming API.
Correct, this request doesn't make sense with the ZIP format. Writing a stream makes sense, but reading a stream does not.
Thanks for the package! It is really helpful.
In my project, I download a large zip file and then unzip it. Currently, I have to first save the zip on disk and then use node-stream-zip to extract it, because node-stream-zip only supports file path as input, not stream. This will write extra data to disk that actually not needed.
Preferred way could be, node-stream-zip can be chained with the download stream, like:
This will save disk space and time on disk I/O.