The best way forward is for you to create a PR on GitHub so we can all see
what this would look like.

Thank you,
Gary


On Thu, Nov 11, 2021, 03:08 <flattered_moonst...@tutanota.com.invalid>
wrote:

>
> PKWARE-APPNOTE-6.3.9.txt states:
>
> 4.3.14  Zip64 end of central directory record
>   ...
>   total number of entries in the central directory           8 bytes
>
> 4.3.16  End of central directory record:
>   ...
>   total number of entries in the central directory           2 bytes
>
> Yet the list to keep track of those entries in ZipFile is a LinkedList:
>
> private final List<ZipArchiveEntry> entries = new LinkedList<>();
>
> Would it not be more efficient with an ArrayList whose initial capacity
> matches the total number of entries
> stated in the end of directory record? Assuming the total number of
> entries <= Integer.MAX_VALUE – 8
> of course (see https://www.baeldung.com/java-arrays-max-size).
>
> This would also open the way for adding an option to have the ZipFile
> entry list sorted *in-place*
>  in physical order, which eliminates the needs to allocate yet another
> large array in getEntriesInPhysicalOrder when dealing with zip files
> containing many entries.
>
> --
>  Sent with Tutanota, the secure & ad-free mailbox.
>

Reply via email to