[ 
https://issues.apache.org/jira/browse/COMPRESS-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nick Burch updated COMPRESS-316:
--------------------------------
    Attachment: zlib-header-detection.patch

Proposed patch which adds zlib header signature detection to 
DeflateCompressorInputStream, uses that in CompressorStreamFactory, and adds a 
test to DetectCompressorTestCase using an existing test file

> CompressorStreamFactory doesn't handle deflate streams with a zlib header
> -------------------------------------------------------------------------
>
>                 Key: COMPRESS-316
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-316
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Compressors
>    Affects Versions: 1.9
>            Reporter: Nick Burch
>         Attachments: zlib-header-detection.patch
>
>
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to