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

CompressorStreamFactory doesn't handle deflate streams with a zlib header

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.10
    • Component/s: Compressors
    • Labels:
      None

      Description

      If you take a zlib / deflate compressed file, with the zlib header (eg the test file bla.tar.deflatez) and pass it to CompressorStreamFactory.createCompressorInputStream, it won't be detected and you'll get a CompressorException("No Compressor found for the stream signature.")

      While detecting header-less zlib files is probably too tricky to manage, those with the header ought to be possible to spot and handle

        Attachments

        1. zlib-header-detection.patch
          4 kB
          Nick Burch

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nick Nick Burch
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: