commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawid Weiss (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (COMPRESS-380) Support for ENHANCED_DEFLATED (Deflate64) in ZIP files
Date Sat, 06 Jan 2018 16:20:00 GMT

    [ https://issues.apache.org/jira/browse/COMPRESS-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16314726#comment-16314726
] 

Dawid Weiss edited comment on COMPRESS-380 at 1/6/18 4:19 PM:
--------------------------------------------------------------

I isolated a smaller example file that still fails at runtime, with a more complex exception.
Total commander (info-zip) decompresses this file just fine (it's a png file) so it has to
be something in the decoding routine.

https://github.com/apache/commons-compress/pull/58

{code}
java.lang.IllegalStateException: Attempt to read beyond memory: dist=5955
	at org.apache.commons.compress.compressors.deflate64.HuffmanDecoder$DecodingMemory.recordToBuffer(HuffmanDecoder.java:471)
	at org.apache.commons.compress.compressors.deflate64.HuffmanDecoder$HuffmanCodes.decodeNext(HuffmanDecoder.java:292)
	at org.apache.commons.compress.compressors.deflate64.HuffmanDecoder$HuffmanCodes.read(HuffmanDecoder.java:264)
	at org.apache.commons.compress.compressors.deflate64.HuffmanDecoder.decode(HuffmanDecoder.java:165)
	at org.apache.commons.compress.compressors.deflate64.Deflate64CompressorInputStream.read(Deflate64CompressorInputStream.java:77)
	at java.io.InputStream.read(InputStream.java:101)
	at org.apache.commons.compress.compressors.deflate64.Deflate64BugTest.readBeyondMemoryException(Deflate64BugTest.java:23)
{code}


was (Author: dweiss):
I isolated a smaller example file that still fails at runtime, with a more complex exception.
Total commander (info-zip) decompresses this file just fine (it's a png file) so it has to
be something in the decoding routine.

https://github.com/apache/commons-compress/pull/58

> Support for ENHANCED_DEFLATED (Deflate64) in ZIP files
> ------------------------------------------------------
>
>                 Key: COMPRESS-380
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-380
>             Project: Commons Compress
>          Issue Type: New Feature
>            Reporter: Dawid Weiss
>             Fix For: 1.16
>
>         Attachments: archive-deflate.zip, archive-deflate64.zip, archive.zip, archive64.zip,
compress-380.diff, hello.world, input2
>
>
> Some of the (large) ZIP files we try to process currently will throw this:
> {code}
> UnsupportedZipFeatureException: unsupported feature method 'ENHANCED_DEFLATED' 
> {code}
> which is a bummer since JDK's implementation also doesn't support Deflate64. This seems
to be PKWare's extensions, although code to decrypt it exists in zlib (and is appropriately
licensed, I believe).
> https://github.com/madler/zlib/tree/master/contrib/infback9



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message