[
https://issues.apache.org/jira/browse/COMPRESS-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16305358#comment-16305358
]
Stefan Bodewig commented on COMPRESS-380:
-----------------------------------------
[~dawid.weiss] thanks!
[~chalmagr84] thanks again, I've been able to follow the code very well. I've
got two minor issues around error checking. The result of {{readBits}} is never
checked and could be -1 if we reach the end of the input prematurely. It would
probably be better to throw an exception in that case immediately than work
with some bogus offsets and end up with corrupted output or exceptions later
on. Second the zlib code has some additional checks like verifying the number
of length symbols is not too big when reading dynamic Huffman tables. I can
easily adjust this myself if this is fine with you.
Once the code is in I'd like to try some micro-benchmarks and combine your
{{DecodingMemory}} class parts of
{{org.apache.commons.compress.compressors.lz77support.AbstractLZ77CompressorInputStream}}
as the later contains some special case code that may be useful. But this
really only is an optimization step after the rest fits.
> 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)