Live data from Hacker News

Don't Use RAR

group.miletic.net

81–90 of 218 posts

Re: Don't Use RAR

#81

I've used winRAR for a long time because of the "self-extracting executable" feature. You can set it up to create an exe (instead of a rar) that extracts files to a particular location and then runs arbitrary commands. It's like a super simple ghetto-fabulous installer and it just works. Now I wonder what else can do that as easily in a windows environment? I haven't looked around because I haven't needed to but now…

7-zip also supports SFX archives. Its implementation also supports a post-decompression command, which is to my knowledge not yet implemented in the 7-zip UI but you can write a small batch file to make one.

Re: Don't Use RAR

#82

The rar license prohibits writing a compatible compressor? What kind of nonsense is that? I clicked the license link and there is a scary looking anti-reverse-engineering clause, but 1) that sounds legally dubious given how the program is distributed; and 2) there is a FOSS decompressor, and studying that may be sufficient to write a compressor without examining the non-free official compressor. The article is right…

In some countries there's an exception in the copyright law if you're reverse engineering something to provide compatibility.

Re: Don't Use RAR

#83
I’m not fully convinced of my own position here, but I have long suspected that “zipping” at all is an abstraction that shouldn’t really be exposed to the user. Like it’s a throwback to an earlier era.

The basic trade off is size for speed, and it seems like most cases it could handled automatically at the level of the file system maybe. Like if I have a big file that I want to send, it sort of feels like the software I use to send it should do the work of preparing it for transport to the target system. Similarly, if there are files that aren’t being touched very often shouldn’t the file system figure out that file can be in “small, slow” mode? Or maybe if I know a particular file should be always fast or always small, I should have the option in the file properties for it to be Automatic, Always Small, or Always Fast, like a toggle right near the permissions controls. But not like a separate program that generates separate, smaller, slower files of a special type. Why can’t folders be automatically treated like singular archives when I try to do operations on them for which that makes sense? Why do I have to think about these details?

I’m probably missing some important use cases and archiving features, but maybe those can be broken out from the default of “do the obvious thing automatically.”

Re: Don't Use RAR

#85
FWIW libarchive and its commandline tool bsdtar, which are widely available and often installed by default on Linux hosts, is able to unpack most rar files.

Other than that I agree with the post, but if you have a rar file and need to unpack it that's often good to know.

Re: Don't Use RAR

#86
post #44

Good luck trying to send a file compressed with Zstd or Brotli to people and have them know what to do with them. I’d certainly have to google to figure out how to open one of those. And I’m an engineer and aware that those formats exist.

You won't be able to do that with RAR files either. The only archive/compression format that you can send anyone is ZIP, since both Windows and macOS can open them ootb.

Re: Don't Use RAR

#87

I’m not fully convinced of my own position here, but I have long suspected that “zipping” at all is an abstraction that shouldn’t really be exposed to the user. Like it’s a throwback to an earlier era. The basic trade off is size for speed, and it seems like most cases it could handled automatically at the level of the file system maybe. Like if I have a big file that I want to send, it sort of feels like the softwar…

Folders can be compressed archive files with the right OS/fake filesystem combination, although that's mostly ease of use.

The main 2 reasons for an archive file are giving to someone else, or compression. The FS can do compression these days, so it's mostly about giving 1 file to someone else, not 1000.

Using archive files to avoid excess file wastage seems like a bad idea, make the FS better instead

Re: Don't Use RAR

#88

This is conflating archive format with compression algorithm. The very broad statement "7-Zip achieves a better compression ratio, but it is much slower to compress than RAR" should be demonstrated over all compression levels with a curve of compression-ratio vs time. I am skeptical RAR cannot be outperformed by 7zip in at least some situations. The license is the strongest argument to not use RAR.

> The license is the strongest argument to not use RAR. Why? Most of the daily tools that keep business world running are closed source. Excel. Or Photoshop. Or Windows/MacOS itself. But RAR license and not being open source is now pushing it too far? Really?

No, those are also bad - but harder to displace.

Re: Don't Use RAR

#89

This is conflating archive format with compression algorithm. The very broad statement "7-Zip achieves a better compression ratio, but it is much slower to compress than RAR" should be demonstrated over all compression levels with a curve of compression-ratio vs time. I am skeptical RAR cannot be outperformed by 7zip in at least some situations. The license is the strongest argument to not use RAR.

7-zip is single-threaded (by default; there are switches you can play with and -mt is not enough), which means, that you are waiting for your stuff to compress, while simultaneously most of your cores are idle. I don't know what winrar uses, I don't use it; but this is my annoyance with 7zip.

I assume you mean command line? The 7zip UI appears to set threads to the number of CPUs by default for LZMA2, and hits 100% on all cores.

Zip format also defaults threads to number of CPUs, but only hit 30% CPU (over 16 threads) on some test data.

Re: Don't Use RAR

#90
All things considered, there are no reasons left to use RAR.

I sometimes run into RAR files that 7zip thinks are corrupt but WinRAR opens just fine. That by itself means I keep it installed. It doesn't hurt that the GUI is more pleasant.

Post reply on HN