CesiumGS / 3d-tiles-tools

Apache License 2.0
316 stars 47 forks source link

deflate64 is unsupported #66

Open mramato opened 1 year ago

mramato commented 1 year ago
javagl commented 1 year ago

Oh... that's subtle ...

Cesium Deflate64

😕

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...

mramato commented 1 year ago

@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.

javagl commented 1 year ago

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

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...