Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] ReadStream for input #97

Open
guoyunhe opened this issue Jan 26, 2023 · 2 comments
Open

[Feature Request] ReadStream for input #97

guoyunhe opened this issue Jan 26, 2023 · 2 comments

Comments

@guoyunhe
Copy link

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:

download().pipe(new StreamZip())

This will save disk space and time on disk I/O.

@cinderblock
Copy link

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.

@pauldraper
Copy link

Correct, this request doesn't make sense with the ZIP format. Writing a stream makes sense, but reading a stream does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants