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

Open
MaxPower85 opened this Issue Mar 14, 2018 · 7 comments

Comments

3 participants
@MaxPower85

MaxPower85 commented Mar 14, 2018

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

This comment has been minimized.

Owner

aonez commented Mar 14, 2018

Can you name some of this formats?

@MaxPower85

This comment has been minimized.

MaxPower85 commented Mar 14, 2018

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

This comment has been minimized.

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

This comment has been minimized.

MaxPower85 commented Mar 17, 2018

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

This comment has been minimized.

Contributor

gingerbeardman commented Mar 17, 2018

I like the way you think. 👍

@aonez aonez self-assigned this Mar 22, 2018

@aonez aonez added this to the Future milestone Mar 22, 2018

@aonez aonez added unrar unar labels Mar 22, 2018

@aonez

This comment has been minimized.

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

This comment has been minimized.

Owner

aonez commented Nov 26, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment