zip-rs / zip-old

Zip implementation in Rust
MIT License
731 stars 204 forks source link

Implement ZipWriter::new_streaming for unseekable writers #383

Closed axnsan12 closed 5 months ago

axnsan12 commented 1 year ago

This is a revival of #114 to implement unseekable writing via data descriptors.

No public API is changed except for the addition of ZipWriter::new_streaming, and all adjacent functionality still works - zip64, extra data, ZipCrypto encryption. I even fixed a bug where encryption was broken if used together with extra data :).

chenxiaolong commented 1 year ago

Thanks a lot for implementing this!

I've been testing it quite a bit and it's been working very well. I only found a single issue where a panic occurs with the streaming ZipWriter when a non-zip64 small file entry is written such that the local header offset is >=2^32. I fixed it with: https://github.com/chenxiaolong/zip/commit/989101f9384b9e94e36e6e9e0f51908fdf98bde6.

Pr0methean commented 5 months ago

This repo is no longer maintained. Could you please rebase this against https://github.com/zip-rs/zip2 and reopen it there?