https://bz.apache.org/bugzilla/show_bug.cgi?id=69867

--- Comment #1 from Jacobo Aragunde PĂ©rez <[email protected]> ---
I've been investigating the issue and found a few things:

In ZipArchiveThresholdInputStream we
ZipArchiveInputStream.get[Compressed|Uncompressed]Count() methods to obtain the
sizes, then calculate the ratio.

Sizes calculated by ZipArchiveInputStream may be incorrect in some cases. Per
the API documentation: "ZipArchiveInputStream [...] may return unknown sizes
and CRC values for entries until the next entry has been reached if the archive
uses the data descriptor feature.". Reference:
https://commons.apache.org/proper/commons-compress/apidocs/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.html

ZipArchiveEntry seems to return the right sizes. I've implemented a workaround
for my code using that. I will rework that into a patch for POI.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to