-
Notifications
You must be signed in to change notification settings - Fork 226
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
Decompress from stream #314
Comments
@zamazan4ik Can we have this feature in |
Yes, you can. But this library is in maintenance-only state. So if you want to implement it, the best idea is prepare a PR and send it here :) I will try to review and merge it. |
I have zero knowledge on zip's codebase, but I will spend my time to understand and hopefully it won't be too complicated to add this feature. |
I just realized that zip keeps its central directory at the end of the file, so it is possible to parse the local file header first and extract them, then parses the central directory and set the attributes of the files/dirs created. Sounds feasible but it would be quite complex and I'd better create a new type specifically for this functionality. @zamazan4ik Does that sound good to you? Is there anything I miss regarding zip format? |
Aha, I just realized that It's missing Perhaps I can implement something atop it, or I can expose the central directory so that user can parse that themselves. |
Here in
cargo-binstall
, we are forced to write the downloaded file first to the disk, then pass it toZipArchiver
whereas all the other algorithms we support (gzip, xzip and zstd) have a streaming interface that just acceptsBufRead
(andRead
for convenience).Is it possible for zip to have a streaming interface that takes
BufRead
?The text was updated successfully, but these errors were encountered: