[ https://issues.apache.org/jira/browse/COMPRESS-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16319080#comment-16319080 ]
Dawid Weiss commented on COMPRESS-380: -------------------------------------- The thing is: I really like when the compiler makes it explicit for me. I do read the docs, but mistakes do happen. Also, this really doesn't look trappy in the current form: {code} try (ZipFile zfile = new ZipFile("/my/file.zip")) { Enumeration<ZipArchiveEntry> entries = zfile.getEntries(); while (entries.hasMoreElements()) { ZipArchiveEntry e = entries.nextElement(); try (InputStream is = zfile.getInputStream(e)) { // .. read is in blocks or wrap in a BufferedInputStream... doesn't matter, // it'll be slow. {code} and it is trappy. That constructor on ZipFile creates an unbuffered stream and this causes 10x slower performance than it could have been if the stream was buffered. I don't see how it can be fixed from the user side, actually, as even if you do wrap the output from zfile.getInputStream in a buffered input stream (or read in large byte[] blocks), the performance will still be very, very poor. > 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)