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

Use unar to add support for uncompressing formats 7z can't handle #148

Closed
MaxPower85 opened this issue Mar 14, 2018 · 8 comments
Closed

Comments

@MaxPower85
Copy link

There is unar CLI utility (Unarchiver) and it supports a wide range of formats, including some that aren't supported by Keka now... some of those formats go back to days of Classic Mac OS and it could still be useful adding support for those formats if someone who is emulating old Macs wants to uncompress some archives in modern macOS, so he wouldn't have to look for Classic Mac OS archivers that can handle them.

Even if you want to use 7z by default for uncompressing less common formats, you could maybe check if 7z throws an error and if it does try uncompressing with unar.

And maybe just give users an option in preferences to choose between 7z or unar as a default unarchiving utility for less common formats.

For more common modern formats, just use what performs the best with multithreading for that specific format (users don't need to have an option with what to compress/uncompress popular modern formats, so they wouldn't select something without multithreading and significantly degrade performance).

BTW... if you are using unar for an ISO in some archive, make sure to use options not to uncompress the ISO too after it decompresses the archive because many would probably just want to take an ISO out of an archive and not uncompress it too.

@aonez
Copy link
Owner

aonez commented Mar 14, 2018

Can you name some of this formats?

@MaxPower85
Copy link
Author

There are often old archives on pages related to Classic Mac emulation... formats that were used by some Classic Mac archivers decades ago... for example, .hqx or some ancient Mac binary format with a .bin extension that was used on Classic Macs to preserve resource forks when they exchanged files... and there were other archive formats with different extensions too, although it seems that .hqx was most common... 7z usually just throws an error for archives with extensions like those that they often have on pages related to Classic Mac emulation... unless someone repackaged old archives to .zip or something like that.

With unar it seems that usually those old archives can be opened... and Archive Utility can open .hqx and archives in that old Mac binary format with a .bin extension (it even sometimes seems to do a better job than unar for some archives, but unar supports more of those old formats than Archive Utility).

There are also some old disk images with .smi or .img or .dsk extension that even unar can't open, but they can be converted to .dmg with hdiutil convert old_image.smi -format UDRW -o new_image.dmg and then they can be opened.

@gingerbeardman
Copy link
Contributor

gingerbeardman commented Mar 14, 2018

https://theunarchiver.com/command-line

It’s the command line part of The Unarchiver app (recently bought out by MacPaw)

If this is added to Keka, it blurs the line between Keka and The Unarchiver. Why not just use The Unarchiver for those other formats?

@MaxPower85
Copy link
Author

I think that Keka should use whatever works the best for a specific format and at a specific level.

Like if pbzip2 can compress something at lower levels faster than 7z can, it makes sense to use pbzip2 for bzip2 format at lower levels... and if 7z can compress something more at it's highest level than pbzip2 can at it's highest levels, it makes to use 7z when the speed of compression doesn't matter... and if pbzip2 can decompress bzip2 archives faster, it makes sense to use pbzip2 for uncompressing.

So... if 7z doesn't support some specific format, it makes sense to add support for those formats using something else... and just choose what will handle which format based on the performance.

@gingerbeardman
Copy link
Contributor

I like the way you think. 👍

@aonez
Copy link
Owner

aonez commented Nov 14, 2018

Will use unar in 1.1.6 for ZIP extraction, this will solve a few issues such as #12, #294, #293 and #138 (extraction only). Although not yet finished (it has problems with >4GB files), this is almost implemented.

In later versions I'll add other supported formats extraction.

@aonez aonez modified the milestones: Future, 1.1.6 Nov 14, 2018
@aonez aonez modified the milestones: 1.1.6, 1.2.0 Nov 26, 2018
@aonez
Copy link
Owner

aonez commented Nov 26, 2018

unar is now integrated. Addling more file support in 1.2.0.

@aonez aonez modified the milestones: 1.2.0, 1.3.0 Jun 3, 2020
@aonez aonez modified the milestones: 1.3.0, 1.2.62 May 10, 2023
@aonez aonez added the fixed label May 10, 2023
@aonez
Copy link
Owner

aonez commented May 10, 2023

unar will be used if 7z fails, similar to as the contrary was done for some versions ago.

@aonez aonez closed this as completed Jun 28, 2023
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

3 participants