Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't read Windows native zip file #49

Closed
TimG1964 opened this issue Apr 24, 2024 · 6 comments · Fixed by #75 or #77
Closed

Can't read Windows native zip file #49

TimG1964 opened this issue Apr 24, 2024 · 6 comments · Fixed by #75 or #77

Comments

@TimG1964
Copy link

Windows native zip files use a method called Deflated 64. ZipArchive cannot read these files:

ERROR: LoadError: ArgumentError: invalid compression method: 9. Only Store and Deflate supported for now

It would be good to be able to read Windows native zip files.

@nhz2
Copy link
Member

nhz2 commented Apr 24, 2024

Thank you for the issue. Yes, Deflate64 is currently unsupported.

There is no codec package that supports Deflate64 right now.

I think p7zip_jll supports Deflate64, so maybe there could be an option added to allow p7zip_jll to handle the decompression.

There is also https://github.com/madler/zlib/blob/master/contrib/infback9/infback9.h which could be made into a jll package in Yggdrasil but this C code is not officially supported it seems. This is the method used by https://github.com/brianhelba/zipfile-deflate64

Another option is to fork https://github.com/GunnarFarneback/Inflate.jl and patch it to work with Deflate64, as I think Deflate and Deflate64 are very similar.

For testing, would you happen to know if there is any good documentation of Deflate64 or any example files to test against?

@nhz2
Copy link
Member

nhz2 commented Apr 27, 2024

I found some unofficial documentation in https://libzip.org/specifications/appnote_iz.txt

@nhz2
Copy link
Member

nhz2 commented May 22, 2024

@TimG1964
Copy link
Author

This post on discourse seems to suggest that, yes, 7z could help solve this:

https://discourse.julialang.org/t/file-zipping-taking-longer-for-large-files/115963/2?u=timg

@nhz2
Copy link
Member

nhz2 commented Jul 31, 2024

@TimG1964
Copy link
Author

TimG1964 commented Sep 2, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants