You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Fuwei Chin (JIRA)" <ji...@apache.org> on 2017/11/08 13:45:01 UTC
[jira] [Created] (COMPRESS-428) Adding option to auto-select final
method(DEFLATED or STORED) for ZipArchiveOutputStream
Fuwei Chin created COMPRESS-428:
-----------------------------------
Summary: Adding option to auto-select final method(DEFLATED or STORED) for ZipArchiveOutputStream
Key: COMPRESS-428
URL: https://issues.apache.org/jira/browse/COMPRESS-428
Project: Commons Compress
Issue Type: Improvement
Components: Compressors
Affects Versions: 1.13
Environment: commons-compress 1.13
Reporter: Fuwei Chin
Priority: Minor
Fix For: 1.16
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.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)