Open mramato opened 1 year ago
Oh... that's subtle ...
😕
If you have any recommendations for alternative ZIP libraries, I'll have a look. Otherwise, I'll have a look at one of these 6302 libraries...
@javagl Unfortunately I don't think one exists. This doesn't affect my project directly, but I wanted to write it up since we noticed it.
I could reproduce this by creating a ZIP that uses Defalte64.
An aside: The Windows Explorer does not always seem to use it, even for large archives. From a quick test, it seemed that
Deflate
Deflate64
Whatever the reason for that is. In 7zip, the method can be selected explicitly, so that's an option for creating test data.
I have no idea how to resolve this, though. There does not seem to be any library that supports Deflate64. Even the zlib FAQ just say:
Does zlib support the new "Deflate64" format introduced by PKWare?
No. PKWare has apparently decided to keep that format proprietary, since they have not documented it as they have previous compression formats. In any case, the compression improvements are so modest compared to other more modern approaches, that it's not worth the effort to implement.
So we're out of luck here. If that comes up in practice, the only solution would be: Unpack that archive (in doubt, with some command-line call), and pass in the resulting directory.
Unrelated: I'm pretty sure that there is a bug related to that lurking in node-stream-zip
which tries to use zlib
for uncompressing Deflate64 data in the synchronous case, but not in the stream case, but that's none of our business for now...
node-stream-zip
does not support deflate64, so any zip file using it fails.