You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Peter Lee (Jira)" <ji...@apache.org> on 2021/01/03 02:58:00 UTC

[jira] [Closed] (COMPRESS-503) "open when actually needed" for MultiReadOnlySeekableByteChannel

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

Peter Lee closed COMPRESS-503.
------------------------------
    Resolution: Duplicate

> "open when actually needed" for MultiReadOnlySeekableByteChannel
> ----------------------------------------------------------------
>
>                 Key: COMPRESS-503
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-503
>             Project: Commons Compress
>          Issue Type: Improvement
>    Affects Versions: 1.19, 1.20
>            Reporter: Peter Alfred Lee
>            Priority: Minor
>             Fix For: 1.21
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 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.
>  
> This may be used in ZipArchiveInputStream and ZipFile cause {{MultiReadOnlySeekableByteChannel}} is used in them.
>  
> Actually this is a pretty rare case cause most split zips would not have too many segments. Just thinking about a split zip with 1,000+ segments - it must be a nightmare. So I'm not sure if this is needed for {{MultiReadOnlySeekableByteChannel.WDYT?}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)