Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.13
-
None
-
commons-compress 1.13
Description
Before writing "deflated" data to output stream, check if the compressed size of a zip archive entry is bigger than or equal to its original size, if so then use method "stored" instead, just like what 7-Zip does when creating a zip file.
The optimization above can be done by
1. adding a new option "DEFLATED_IF_NECESSARY" for ZipArchiveOutputStream#method.
2. auto-selecting final method(DEFLATED or STORED) if DEFLATED_IF_NECESSARY specified.