zip-rs / zip-old

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

zip file created on windows 11 can't be unzipped #382

Closed xudesheng closed 5 months ago

xudesheng commented 1 year ago

My customer shared a zip file (too big to attach here), which he created from his Windows 11 machine with the built-in function.

I can't double-click on my Mac to unzip it (I believe it's using the Archive Utility), but I can use the "unzip" command to unzip it.

when I use this crate to unzip it, the crate reports an error: unsupported Zip archive: Compression method not supported.

any idea how to export the compression method in the error message?

xudesheng commented 1 year ago

Unfortunately, it's due to:pub const DEFLATE64: Self = CompressionMethod::Unsupported(9); It seems like Windows will use the Deflate64 algorithm if the file size is 2G or more.

xudesheng commented 1 year ago

This issue is about how to support deflate64 when unzip. I submitted an issue to the flate2-rs crate at: https://github.com/rust-lang/flate2-rs/issues/365 notice this new crate pops up: https://crates.io/crates/deflate64

hope zip-rs can leverage it to support deflate64 when unzip.

Pr0methean commented 5 months ago

Fixed by https://github.com/zip-rs/zip2/pull/18.