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

Wrong "version needed to extract" for ZIP files compressed with bzip2 #763

Closed
armijnhemel opened this issue Jan 24, 2024 · 1 comment
Closed
Labels
bug Bug bzip BZIP2 compression format zip ZIP file format

Comments

@armijnhemel
Copy link

When I compress a file with bzip2 compression the wrong "version needed to extract" seems to be recorded. Instead of 4.6 it records 2.0:

$ ./minizip -b /tmp/bla.zip /bin/ls
minizip-ng 4.0.4 - https://github.com/zlib-ng/minizip-ng
---------------------------------------------------
-b /tmp/bla.zip /bin/ls 
Archive /tmp/bla.zip
Adding ls
$ file /tmp/bla.zip 
/tmp/bla.zip: Zip archive data, at least v2.0 to extract, compression method=bzip2

The ZIP specification ( https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT ) section 4.4.3.2 says that the minimum feature version should instead be 4.6:

4.6 - File is compressed using BZIP2 compression

When using the regular zip tool:

$ zip -Zb -r /tmp/bla2.zip /bin/ls
  adding: bin/ls (bzipped 56%)
$ file /tmp/bla2.zip 
/tmp/bla2.zip: Zip archive data, at least v4.6 to extract, compression method=bzip2
@nmoinvaz
Copy link
Member

Thanks, I have fixed it in the develop branch.

@nmoinvaz nmoinvaz added zip ZIP file format bzip BZIP2 compression format bug Bug labels Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug bzip BZIP2 compression format zip ZIP file format
Projects
None yet
Development

No branches or pull requests

2 participants