Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-428

Adding option to auto-select final method(DEFLATED or STORED) for ZipArchiveOutputStream

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.13
    • Fix Version/s: None
    • Component/s: Compressors
    • Environment:

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              fuwei Fuwei Chin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: