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

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.13
    • None
    • Compressors
    • 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

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

            Dates

              Created:
              Updated: