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

Round-tripping fails #4

Open
finestructure opened this issue Aug 22, 2024 · 1 comment
Open

Round-tripping fails #4

finestructure opened this issue Aug 22, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@finestructure
Copy link

It looks like this package is a slightly newer version of https://github.com/marmelroy/Zip and I was hoping it might address a round-tripping issue I reported there.

Unfortunately, this version here (2.2.0) also throws a zipUnfail when trying to unzip the attached file (which was zipped with version 2.1.2).

https://github.com/marmelroy/Zip/files/15454388/prod-apple-swift-metrics-main-e6a00d36.zip

I thought I'd raise this again here in case it got lost in the other repo. Please feel free to close either as a duplicate if that's not helpful!

@fpseverino fpseverino added the bug Something isn't working label Aug 22, 2024
@fpseverino
Copy link
Member

As you said in the original issue unzipping the file in Finder works, so I've tried to re-zip it using Finder, and unzipping that with Zip works. I've also tried to re-zip it with Zip 2.2.0, and unzipping that works too. You can see these tests here.

I looked at the C code you pointed to in the original issue and realized that the vendored library is a weird mix of Minizip v1.0 and v1.1 (maybe from some development branch). I updated it to the official v1.1 and then to v1.2, and unfortunately unzipping your original file doesn't work with neither.

Of course it's weird that this library can't unzip a file that other libraries can, so further investigation is needed.

@fpseverino fpseverino added the help wanted Extra attention is needed label Aug 24, 2024
fpseverino added a commit that referenced this issue Aug 27, 2024
- Update vendored Minizip library to [v1.2](https://github.com/zlib-ng/minizip-ng/tree/1.2)
- Move files to respect SPM folder structure
- Add round-tripping test (#4)
- Add DocC catalog
- Improve code to use new features from Swift 5.8+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Development

No branches or pull requests

2 participants