zip-rs / zip-old

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

Add ZipWriter::set_file_metadata() #373

Closed exFalso closed 5 months ago

exFalso commented 1 year ago

This PR adds a method to ZipWriter which overwrites the internal crc32 calculation.

Use case: in our specific scenario we need to write to the inner Write outside of ZipWriter (tldr: we deal with very large files which need to be streamed/managed independently), but we need ZipWriter to be aware of this in order to write the correct length and crc32 values to the zip metadata.

Pr0methean commented 5 months ago

Replaced with https://github.com/zip-rs/zip2/pull/66.