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

Zstandard inside zip, PKWARE method 20 #193

Closed
klauspost opened this issue Apr 27, 2021 · 6 comments
Closed

Zstandard inside zip, PKWARE method 20 #193

klauspost opened this issue Apr 27, 2021 · 6 comments

Comments

@klauspost
Copy link

Seems like PKWARE decided to use method 20 for zstd inside zip: https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.7.TXT

Because why use the value everyone else use?

Either way. It seems like it should be trivial to add that as a supported decompression method.

Here is a sample zip: zstdzip.zip. file1.txt is WinZip (method 93) and file2.txt is method 20, PKWARE.

I have been unable to download PKWARE zip software, so unfortunately I have been unable to confirm that this is the correct method. This is from my own library.

@mcmilk
Copy link
Owner

mcmilk commented Apr 27, 2021

I had written a email to both, and method id93 was the result in the end, see this issue: #132 (comment)

If you take a look into the next pkware versions, the notes to zstd changes: https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.8.TXT

But of cause, we could add method id 20 for decompression only ... will you create an PR or should I do in the next release ?

@klauspost
Copy link
Author

@mcmilk Yeah, decompression only would be neat.

I don't have a dev env set up currently, so I can't submit a PR (that I've tested anyway). Sorry for that.

@mcmilk
Copy link
Owner

mcmilk commented Apr 27, 2021

I will do it into the next release...

@ghost
Copy link

ghost commented May 10, 2021

In 21.02 Alpha, Igor has added both IDs (20 and 93).

  • 20: ZstdPk
  • 93: ZstdWz

This means that 7-Zip 21.02 can recognize ZIP entries which use Zstd, but since upstream 7-Zip does not support Zstd, it cannot decompress them.

@mcmilk
Copy link
Owner

mcmilk commented May 13, 2021

I have added decompression of id=20 ... testing needs to be done, but I think it will work with 21.02 release.

@mcmilk
Copy link
Owner

mcmilk commented May 13, 2021

Works

@mcmilk mcmilk closed this as completed May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants