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

[REQ] Unable to extract zip file with zstd compression #1304

Open
Sytten opened this issue Aug 7, 2023 · 3 comments
Open

[REQ] Unable to extract zip file with zstd compression #1304

Sytten opened this issue Aug 7, 2023 · 3 comments

Comments

@Sytten
Copy link

Sytten commented Aug 7, 2023

Configuration

  • Keka version: 1.3.2
  • macOS version: 11.7.2

Describe the bug

Files with compression zstd (method 93) are not extractable with Keka. I was able to extract them with p7zip. The files are created in rust with the zip library.
Looking at the logs it's most likely just that it requires an update to the 7zip to support the method.

To Reproduce

sample.zip

Logs

OS: Version 11.7.2 (Build 20G1020) (x86_64)
Keka: v1.3.2-r5208 (WEB) (Sandboxed) (en)
Format detected: ZIP
Binary used: kekaunar
Arguments: (
    "-q",
    "-r",
    "-D",
    "-K",
    "-nq",
    "-o",
    "/Users/Sytten/Projects/Personnal/zip/sample.kextraction/Operation",
    "/Users/Sytten/Projects/Personnal/zip/sample.zip"
)
Extraction to directory "/Users/Sytten/Projects/Personnal/zip/sample.kextraction/Operation" failed (1 file failed.)

OS: Version 11.7.2 (Build 20G1020) (x86_64)
Keka: v1.3.2-r5208 (WEB) (Sandboxed) (en)
Format detected: ZIP
Binary used: keka7zz
Arguments: (
    x,
    "/Users/Sytten/Projects/Personnal/zip/sample.zip",
    "-snld",
    "-aou",
    "-xr!__MACOSX",
    "-bsp1"
)

7-Zip (z) 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15 : Modified by aone for Keka
 64-bit locale=en_US.UTF-8 Threads:8

Scanning the drive for archives:
  0M Scan /Users/Sytten/Projects/Personnal/zip/

1 file, 1592 bytes (2 KiB)

Extracting archive: /Users/Sytten/Projects/Personnal/zip/sample.zip

--
Path = /Users/Sytten/Projects/Personnal/zip/sample.zip
Type = zip
Physical Size = 1592

  0%
ERROR: Unsupported Method : test/lorem_ipsum.txt


Sub items Errors: 1


Archives with Errors: 1

Sub items Errors: 1

Error code 2
@Sytten Sytten added the bug label Aug 7, 2023
@aonez
Copy link
Owner

aonez commented Aug 14, 2023

So this library is creating a ZIP file using ZSTD compression. Is this expected to be added to the ZIP specification?

Tested with unar, 7zz (the official and updated 7-Zip version), BOOM, Info-Zip and neither of them support that method. That p7zip project is a highly modified version not used in Keka.

Keka supports ZSTD as intended, but not in a ZIP package. Why not creating a ZSTD instead of a ZIP with ZSTD compression?

@aonez aonez added this to the Look at milestone Aug 14, 2023
@aonez aonez changed the title [BUG] Unable to extract zip file with zstd compression [REQ] Unable to extract zip file with zstd compression Aug 14, 2023
@aonez
Copy link
Owner

aonez commented Aug 14, 2023

Just to be clear I don't think this is a bad idea, I love ZSTD. I just don't know how this is implemented and supported in the wild.

@Sytten
Copy link
Author

Sytten commented Aug 14, 2023

ZSTD is not an archive format made for multiple files to my knowledge. So you could create a zip and then compress it but it is wasteful of disk space for large files specially if you are streaming the creating of the zip file like is possible with the lib. Note that this library isnt some unknown, it is the most used in rust with millions of download.

I am not well versed in zip standardization but I believe that new compression methods can be added and it's just a convention? This one is definitely newer and not super well supported at the moment but its not going away for sure.

I was able to use the 7zz installed with brew so unsure which one it is? I think its p7zip.

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