[ https://issues.apache.org/jira/browse/COMPRESS-477?focusedWorklogId=382121&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-382121 ]
ASF GitHub Bot logged work on COMPRESS-477: ------------------------------------------- Author: ASF GitHub Bot Created on: 05/Feb/20 07:59 Start Date: 05/Feb/20 07:59 Worklog Time Spent: 10m Work Description: PeterAlfreadLee commented on pull request #92: COMPRESS-477 : "open when actually needed" for MultiReadOnlySeekableByteChannel URL: https://github.com/apache/commons-compress/pull/92 Please refer (#90)[https://github.com/apache/commons-compress/pull/90] When I was adding zip64 support for split zip, I encountered a problem : When adding testcases in `Zip64SupportIT`, I created a split zip with 10,000+ split segments. Then I found that I was unable to unzip it because there would be too many open files when extracting it. We can oepn the files when actually needed and therefore we can successfully extract such split zips with great amount of segments. I have set a threshold of 20 in `MultiReadOnlySeekableByteChannel`. The "open when actually needed" procedure will only work when the number of split segments is greater than the threshold. Actually this is a pretty rare case cause most split zips would not have too many segments. So you can decide whether to merge this PR or not. :-) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 382121) Time Spent: 14h 10m (was: 14h) > Support for split zip files > --------------------------- > > Key: COMPRESS-477 > URL: https://issues.apache.org/jira/browse/COMPRESS-477 > Project: Commons Compress > Issue Type: New Feature > Components: Archivers > Affects Versions: 1.18 > Reporter: Luís Filipe Nassif > Priority: Major > Labels: zip > Fix For: 1.20 > > Time Spent: 14h 10m > Remaining Estimate: 0h > > It would be very useful to support splitted zip files. I've read > [https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT] and understood > that simply concatenating the segments and removing the split signature > 0x08074b50 from first segment would be sufficient, but it is not that simple > because compress fails with exception below: > {code} > Caused by: java.util.zip.ZipException: archive's ZIP64 end of central > directory locator is corrupt. > at > org.apache.commons.compress.archivers.zip.ZipFile.positionAtCentralDirectory64(ZipFile.java:924) > ~[commons-compress-1.18.jar:1.18] > at > org.apache.commons.compress.archivers.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:901) > ~[commons-compress-1.18.jar:1.18] > at > org.apache.commons.compress.archivers.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:621) > ~[commons-compress-1.18.jar:1.18] > at > org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:295) > ~[commons-compress-1.18.jar:1.18] > at > org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:280) > ~[commons-compress-1.18.jar:1.18] > at > org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:236) > ~[commons-compress-1.18.jar:1.18] > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)