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

feat: preview & extract file formats supported by 7-zip #1926

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Integral-Tech
Copy link
Contributor

@Integral-Tech Integral-Tech commented Nov 20, 2024

@Integral-Tech Integral-Tech changed the title feat: detect zstd & apk as archives feat: preview & extract file formats supported by 7-zip Nov 21, 2024
@Integral-Tech
Copy link
Contributor Author

@sxyazi This PR has been completed :) Would you like to review it?

@sxyazi
Copy link
Owner

sxyazi commented Nov 22, 2024

Thanks for the PR!

I noticed you referenced the supported formats of 7zip, but 7zip has several different versions. On Arch Linux, Yazi uses p7zip, which is a fork of 7zip, while on macOS, it uses 7zip (sevenzip), I'm not sure about Windows.

The supported formats often vary between them. For default configuration, we need to consider the formats supported across all platforms, which means focusing on the smallest common subset - supported by both 7zip and p7zip on Linux, macOS and Windows.

This PR includes many formats I've never seen before, which makes testing them much more difficult. I think we can limit it to common formats that have been verified to work. This would also simplify the rules, especially considering that 7zip is just a temporary solution during the transition. Eventually, I'll implement it myself (see #1864 (comment)), but it's unlikely to support all the formats 7zip does, which would also help reduce confusion once we switch to another tool.

@Integral-Tech
Copy link
Contributor Author

Integral-Tech commented Nov 22, 2024

@sxyazi I just removed application/zlib which is not supported by p7zip.

Additionally, .dmg & .DMG are added as not all .dmg files have MIME type application/apple-diskimage. Take Icalingua++ as an example, it has application/zlib MIME type.

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 this pull request may close these issues.

2 participants