Live data from Hacker News

Don't Use RAR

group.miletic.net

101–110 of 218 posts

Re: Don't Use RAR

#102
post #89

Earlier quoted context omitted.

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.

Yes, I mean command line; it is a long time that I used the gui, though I don't think it is updated often.

With command line, I arrived eventually to a set of switches to use, but the -mt option seems to allocate core per file. That means, that if the filesizes of the archived files are not somewhat distributed, it won't work very well. The extreme is, if you have one huge file and few small ones, the small ones will be compressed quickly and you will be still waiting for the huge one to finish with a single core.

And then there are apps that use liblzma underneath. `flatpak build-bundle` can take almost forever.

Re: Don't Use RAR

#103
post #14

There was a time when RAR was extremely popular because it dealt very well with splitting things across multiple diskette-sized archives, and because it edged out PKZIP in compression. Regardless of its origins and... "traditional" use, these days it has zero relevance given that Windows and MacOS (as well as some Linux file managers) allow you to handle zip files without any additional software - and also because ma…

RAR is still the only format that has PAR2 (?) recovery records trivially available. So it's still the best for long-term archiving.

PAR2 can be easily used with any other archive format and any compression algorithm.

For example I am using it with a pax archive format (which unlike tar handles correctly all file metadata, e.g. extended attributes) and with lrzip compression (better for large files, e.g. movies, which do not compress well with more usual algorithms).

I assume that WINRAR may have a simpler interface for inexperienced users, but a knowledgeable user can easily write a pair of simple scripts with all the command-line options needed to combine PAR2 with any archive file format and any compression algorithm and arrange them to be invoked e.g. by right-clicking on a directory or on an archive file.

Re: Don't Use RAR

#104
post #86

Earlier quoted context omitted.

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.

I wouldn't send a RAR to my grandparents, but if I had to send pictures for a school reunion I would expect everyone to either know how to open a RAR or to be able to figure it out. Worst case they will google rar and will find WinRAR as the first result. For zstd or brotli I can't even name a GUI program able to open them outside a somewhat obscure 7zip fork.

Why would you try to compress pictures....in your case zip is as good as everything else (and less problematic to open)

Re: Don't Use RAR

#105
post #14

There was a time when RAR was extremely popular because it dealt very well with splitting things across multiple diskette-sized archives, and because it edged out PKZIP in compression. Regardless of its origins and... "traditional" use, these days it has zero relevance given that Windows and MacOS (as well as some Linux file managers) allow you to handle zip files without any additional software - and also because ma…

RAR is still the only format that has PAR2 (?) recovery records trivially available. So it's still the best for long-term archiving.

>So it's still the best for long-term archiving.

No it's not, lzip is it and war, as written by archive.org and the European-IT-department

Re: Don't Use RAR

#106

Earlier quoted context omitted.

Its okay to have some business spesific software be closed source, say Excell. But an archive is needed every time you download a collection of files from a government website, or make GDPR request for your data to google. So by choosing RAR you would be forcing millions of people, maybe entire country to use that company's product and giving them power. Is there any good reason for that?

And what's the difference compared to forcing docx/xlsx or psd? The network effects affect every exchange, not just archives.

docx/xslx are open formats.

About psd, yes, that's proprietary. What government agency mandates its use for the public to interact with them? (genuinely asking, not being snarky)

Re: Don't Use RAR

#107
post #63

Does anyone know why RAR is better compression-wise than the two more modern standards? It doesn't seem like it's been updated in a long time, and I would have expected modern software from two of the best houses in the world to handily beat it. Is it that good, or is it a matter of priorities, or something else?

UHARC is more efficient than any of them, but no one uses it.

UHARC looks abandoned and does not support 64bit OS

My memory might be bad on this, but UHARC niche was media files, while rar was good tool for everything.

Re: Don't Use RAR

#108
post #104

Earlier quoted context omitted.

I wouldn't send a RAR to my grandparents, but if I had to send pictures for a school reunion I would expect everyone to either know how to open a RAR or to be able to figure it out. Worst case they will google rar and will find WinRAR as the first result. For zstd or brotli I can't even name a GUI program able to open them outside a somewhat obscure 7zip fork.

Why would you try to compress pictures....in your case zip is as good as everything else (and less problematic to open)

Or if your friends all have WinZip and can tolerate .zipx (which is a file extension for later and thus less interoperable version of ZIP), it does support JPEG recompression so it can be actually better than RAR.

Re: Don't Use RAR

#109
post #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.

Windows has included libarchive and bsdtar by default starting with the April 2018 Update, so they can also be used there to unpack most rar files.

Re: Don't Use RAR

#110

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…

You can write code to do anything, and therefore anything can be viewed as something else. However, all abstractions are leaky, so this is rarely usable in practice, since those leaks trip you up all the time.
Post reply on HN