ouch icon indicating copy to clipboard operation
ouch copied to clipboard

Match Info-ZIP's default compression levels

Open marklit opened this issue 4 years ago • 4 comments

I compressed a 3,853,508,608-byte SQLite3 file using ouch 0.2.0 and pkzip on macOS 11.6. The resulting zip ouch produced was 611,722,010 bytes which was 1,729,697 bytes smaller than Info-ZIP's version but it took 95.43 seconds while pkzip took 75.50 seconds.

Perhaps it's worth matching the default settings so the compression time is within range of Info-ZIP. Also, exposing compression options would be great as well.

marklit avatar Oct 19 '21 13:10 marklit

(About the compression level options, discussion is open at #52, ideas are welcome.)

marcospb19 avatar Oct 19 '21 18:10 marcospb19

The documentation states that it uses this specification:

https://docs.rs/zip/0.5.13/zip/index.html

image

Does this explains it? Or it's just a compression level default configuration?

We use deflate, from what I have read online it seems like that is the same for infozip.

marcospb19 avatar Oct 19 '21 18:10 marcospb19

It's currently not possible to change the deflate compression level:

https://github.com/zip-rs/zip/issues/212.

Will keep this open, we may try helping the contributors of that crate making it possible for ouch to configure it.

marcospb19 avatar Oct 19 '21 18:10 marcospb19

This is now possible and no longer waiting on the ecosystem.

marcospb19 avatar Oct 13 '22 04:10 marcospb19