91

A lot of people are compressing files with RAR, sending compressed files with RAR and so on.

ZIP is more standard and works on all platforms. Windows users have ZIP included and Linux users have no trouble with that file format.

The tests I did sometime ago showed me that RAR compress better (some kilobytes, no more) but not enough to use a non-free program when ZIP works on almost all computers for free.

Why do some people use RAR rather than ZIP for compressing?

FerranB
  • 1,077

21 Answers21

158

Stop using these WinRAR and WinZip tools -- shift to 7-Zip.

  • It's free
  • available across platforms, as command-line and GUI
  • available in portable form across platforms
  • has good compression ratio (check the site or try for yourself)
  • has no pop-up pain
  • allows you to use most of the other formats
  • it is also open-source
  • can be used in commercial and personal development (within GNU LGPL constraints)
  • live support forum at Sourceforge
  • Vista 32-bit compatibility
  • multiple languages supported

The only compression format I find not supported for extraction is ACE.

References.


I am told that my opening sentence to this answer feels 'markety'.

I take it with all the good intention, because
without being paid for this free software or
being in any way associated with it or, the people making it,
I strongly feel the desire to push it to everyone I remotely know.

This comes from my innumerable encounters over the years with
people using these other tools and muttering about incompatibilities,
annoying pop-ups and many other problems, yet, somehow
continuing to miss 7-Zip when it arrived on the scene.

I have since decided to take every opportunity to publicize 7-Zip.

nik
  • 57,042
30

It's HARDCORE!

Really.
That's most RAR users' reason for preferring RAR: Part of the scene. A standard. A sign of doing things like the black-arts-pros do it.

None of these are valid reasons. There was an argument that RAR was faster or that RAR achieved smaller sizes, and this holds true versus ZIP files. But the same people will insist on splitting RAR archives, and creating non-MD5 sums and generating an extra PAR parity file when in the end, they're going to use a Torrent and not Usenet to move the files. In torrents there's no reason for any of that. In fact there's a strong reason not to compress, so the file can be used while being seeded.

But as you can see from here already, the value of having a good version or implementation of the compressor and decompressor can not be understated, and WinRAR just fails that test.

7-Zip takes that cake, and generally does better for size and speed. BZip2 really should be in the running, but lots of people don't have a good GUI implementation. The command-line is great of course, but right clicking like 7-Zip, or drag-and-drop like StuffIt is just so much easier.

Here's someone's 2002 measurements that seem to put RAR ahead. But multi-threading and memory use are allowing for changes in this area that seem to leave RAR behind.

P.S. The worst example of compression used badly is when I see image, video and audio files that are already compressed with a lossy compression like JPEG, DivX, or MP3 further "compressed" with any lossless format. I'm sorry but it should be obvious that in most cases you're not reducing the file to less than 95% of the original size, and in that case you're just wasting everyone's time and efforts.

dlamblin
  • 10,966
16

One feature about WinRAR is it preserves the original creation dates of folders on extraction.

Both rar and .zip preserve folder creation date/time but it seems only winrar preserves that info on extraction

bobobobo
  • 5,460
14

A point against RAR is that there is (as far as I know) no free software that can compress it. As current versions of WinRAR can decompress 7z (and 7z can decompress rar), and 7z usually compresses better than zip (and often better than rar), I tend to send those who send me RAR files 7Z files back :)

All the others get plain old .zip files of course. Maybe they learn from it ;)

mihi
  • 3,447
11

RAR files don't have the limits that ZIP files do. I think ZIP files are limited to containing 65536 files and each file and the total size of the archive is limited to approximately 4GB. There is ZIP64, but it is not an open file format.

From Wikipedia's entry on the Zip file format:

The maximum size for both the archive file and the individual files inside it is 4,294,967,295 bytes (232−1 bytes, or 4 GiB minus 1 byte) for standard .ZIP, and 18,446,744,073,709,551,615 bytes (264−1 bytes, or 16 EiB minus 1 byte) for ZIP64.

Wikipedia also states that RAR was first released in 1993, whereas ZIP64 may not have been released until 2001(?). Also support for ZIP64 was not built in to Windows XP.

See also:

FigBug
  • 455
10

Advantage of RAR over ZIP: GMail doesn't complain when you send executable files (or any other kind of files) in RAR files, but does when you do it in ZIPped files.

Rook
  • 24,289
9

A point against RAR is that there is (as far as I know) no free software that can compress it.

Just to make a comment on this point, the fully-functional command line implementation of RAR is free. (it compresses, it decompresses, it makes summer dresses.. okay not that last one, but it's just as, if not more, powerful than the GUI non-free version).

9

I use Zip because it's available and supported on the machines we have at work, and everyone can work with Zip files.

9

If you work in a Windows environment, then Zip is the best thing to use for compatibility reasons. It may not compress as well as the others, but since support is baked in to XP/Vista/etc, you can be sure that the receiver of a zip file will be able to open it. Especially in a corporate environment, this leads to far fewer instances of 'what do I do with this?'.

If the compression ratio REALLY matters, and you can get the receiver to install something else, then both WinRAR and 7-Zip appear to be able to beat zip in many cases.

But seriously - when does the few percent extra compression they give you matter anymore? Images, sound and video are already compressed for most people (have you EVER worked with raw video at all?), so you aren't going to compress them. And everything else is pretty small by comparison.

With bandwidth being what it is these days, the relatively small amount of extra compression that a non-zip compressor gives you seldom makes up for the compatibility issues.

9

Another thing that RAR has over Zip: Authenticity information. I can "sign" my RAR Archive and then the receiver can see a) who created it, b) what the original filename was, c) when it was created. Additionally, Archive Locking means that the archive cannot be modified - I do not know if Zip can do that, haven't checked. Same goes for recovery records, not sure if Zip/7-Zip support them.

Rar Auth Example

Also, what I like about Rar vs. 7-Zip is the Command Line support. Last time I checked 7-zip, the command line was lacking. I think it was about appending the current date to the filename.

Gareth
  • 19,080
Michael Stum
  • 3,101
9

RAR has the Solid Archive option which concatenate files together before compression. This allows to compress patterns that appear only once per file but are repeated among many files. Very likely with XML files for example.

ZIP does not have such an option.

On Unix platform though, you can TAR your files first before compressing the TAR which will give you roughly the same behavior than RAR with Solid Archive.

7-Zip does support a similar option when using the 7Z compression.

I agree though that ZIP is so standard that it should always be your first option for communication with the outside world. If you can agree with you peers on a better format like RAR or 7ZIP, then do it.

4

You can break up a RAR archive into multiple small parts and send each part separately, for example. the archive cannot be fully restored without all parts, so it is handy.

Aside from this, I don't know of any real advantages of RAR of Zip.

Yuval
  • 2,302
3

RAR usually compresses much better than ZIP. Of course it depends heavily on the data, but most of the time fast RAR is similar to ZIP normal, and RAR best is much better.

Extracting RARs is already well supported on platforms other than Windows: check out 7-zip.

2

The tests I did sometime ago showed me that RAR compress better (some kilobytes, no more)

I think you tried to compress already compressed files like images, video, etc.
Here is my result when I compressed a folder containing mainly source file (Java, jar, txt, images, etc):

13.754 Files
2.234 Folders

I used the best compression option in WinRar for zip and for rar archives.

Before compression

494 MB (518.688.768 bytes)

After compression with ZIP

115 MB (121.024.512 bytes)

After compression with RAR

71,6 MB (75.177.984 bytes)

It's a 43,4 MB difference in my case. So as you can see it depends a lot on what type of data you're compressing.

vovahost
  • 313
2

7zip (generally) has the highest compression ratio but consequently, the slowest. i have ever extracted 4GB wiki data exploded to about 120GB. zip is omnipresent, one of the oldest; anybody, anything, anywhere can handle it, despite in UNIX world, tar + gzip (or bzip) combination is much more preferred. rar has got fair compromises between speed, features/handling and compression ratio, why is it popular among (win) hackers, nobody know though, its a kind of attitude.

aa-
  • 1
2

I believe bzip2 has the best compression of the lot, but it is very slow. 7-zip is my choice on Windows but its icon is horrible; it looks like it's from Windows 95!

I love the standard Linux (Ubuntu, at least) file archiver. When you extract a file, if there's one file or folder in it, it is extracted to the current directory, otherwise a sub folder. Saves all those folder-in-folder situations, where on Windows I constantly check the contents of the zip before extracting.

1

Rar has mostly better compression, and is supposed to be better with compressing errors.

0

Q: Why do some people use RAR rather than ZIP for compressing?

A: Because those people also care about sometime decompressing the compressed file. If I have some time and energy I'll try pit latest 7zip and WinRAR against each other with normal & best settings taking time of compression and decompression of the resulting files. The resulting sizes are generally in similar ballpark so that metric doesn't matter as much (especially when you have decent speed internet available). Atleast couple years ago RAR decompressed twice as fast . v4.0 promises 30% improvement to decompression speed.

I'll update this answer when I have some numbers on hand.

edit: Buried in the comments above was this important thing: "Last I checked 7z was, like tar.gz/tar.bz2, extremely slow when it comes to extracting a single file out of an archive as everything before that file had to be processes for the file to be extractable. rar/zip don't have that problem"

I recall noticing this problem also but I will have to verify on latest 7zip to be sure it's not a problem related to 7z extraction in winrar.

0

I do use 7-zip

It compresses ZIP on par with RAR e.g following will even compress mp4 video or jpeg image a little bit (probably metadata):

7z a -tzip -mfb=258 -mpass=15 -mfb=258 file.zip @list_of_files_no_dir5

It also has a better compression method called 7z which is significantly better (and slower) than RAR.

PS it also extracts RAR, so no big loss going with open source in place of expensive...

phuclv
  • 30,396
  • 15
  • 136
  • 260
ZaB
  • 2,465
0

I use RAR, because the people I work with use RAR, and RAR works just fine for me and my needs.

Sampson
  • 7,378
0

WinRar is such a great tool, so I use RAR when I can. But, if I'm seeking interoperability with other people who might not know about RAR, I use ZIP of course. Fortunately, WinRar can do ZIP as well. :)

JP Alioto
  • 6,550