Saturday, February 14, 2009

7-Zip vs WINRAR

REACT! 
WINRAR (current version: 3.80) was, and still is, popular. You can tell that by the number of people seeding the torrent of it's cracked version on The Pirate Bay (currently 2308 seeding versus 16 leeching). And people have got a reason to buy (or crack) such a program:
  • Very beautiful interface that can be themed.
  • High compression ratios.
  • Quite fast.
  • Supports multithreaded compression.
  • Supports archives with recovery records.
  • Portable version available.
  • Linux command line version available.
  • Available in 47 languages.
  • Supports creation of SFX RAR and ZIP archives
  • Full support for RAR and ZIP.
  • Extraction only support for the following 12 formats: CAB, ARJ, LZH, TAR, GZ, BZ2, ACE, UUE, JAR, ISO, 7Z, Z.
  • AES-128 encryption for RAR files.
  • Is programmed by a Russian, etc.
But WINRAR first of all is not free, neither in price nor free the way FSF means. It costs currently around $30.

On the other hand we have 7-Zip (current version: 4.65)
  • 7-Zip offers even better compression ratios.
  • 7-Zip is slower than WINRAR for some compression ratios but faster for others. (that's something I did not expect, keep on reading)
  • It is smaller in size.
  • Supports multithreaded compression.
  • There is also a portable version.
  • There is also Linux command line version.
  • It is available in 74 laguages. (Nice symmetry with WINRAR's 47 languages)
  • Supports creation of SFX archives in 7z format.
  • Offers full support of the following 5 formats: 7z, ZIP, GZIP, BZIP2 and TAR. The ZIP support offers higher compression ratios than that of WINRAR but no SFX support.
  • Offers extraction only support for the following 18 formats: ARJ, CAB, CHM, CPIO, DEB, DMG, HFS, ISO, LZH, LZMA, MSI, NSIS, RAR, RPM, UDF, WIM, XAR and Z.
  • AES-256 encryption both for 7z and ZIP files.
  • It is also programmed by a Russian ;-)
  • But, most importantly, 7-Zip is completely free and open source!
So what's the catch?

7-Zip used to be buggy and that's perhaps the reason why some people are afraid to use it. The latest versions are really stable. I haven't encountered any strange errors and I use 7-Zip a lot.

7-Zip lacks some features like the recovery records. But do people need them nowadays?
The recovery records are used to recover data from damaged RAR archives. You definitely need those if you store backups on unreliable media. But from my experience most people backup on externals HD drives which if they fail, they fail completely. The recovery records are only useful when bad sectors emerge under the RAR file. They are also completely useless when you transfer RAR files over a P2P network such as Bittorrent since most (if not all) such networks have error correction algorithms in their clients, or will simply redownload bad pieces. In any case you could use PHPar2 to create recovery records for any file, including 7-Zip archives.

7-Zip's interface is simpler than that of WINRAR as you can see:

WINRAR
7-Zip

7-Zip Archive Creation
This is the window you will see every time you add files to an archive. It contains every option you will ever need to use. In addition to these, 7-Zip supports lots of advanced options which you will probably never use but if you ever want to, then read the command line parameters from the help file and add them to the Parameters text field on the above window.

The most important thing in a compression program is the ratios it achieves and it's speed. I tested both programs, using their native format, on 4 different datasets using each of the 7 supported compression levels with solid archives on. Here are the results:

  1. Dataset 1: INSHAME folder. This is the directory where I keep the source code of my programs, the zipfiles that I distribute, some BMPs, and some other zipfiles. I usually backup this so I thought it would be nice for comparing the programs. I can't provide this dataset since it contains personal files.
    You can see the results by clicking here or take a look at this graph directly:

    As you can see WINRAR has the fastest compression while 7-Zip has the highest. WINRAR's Fastest and Fast compression beat 7-Zip's. But after Normal compression 7-Zip beats WINRAR's compression ratios for the same compression time.

  2. Dataset 2: Globulation 2 folder. Globulation 2 is an open source RTS game. This dataset is almost identical to the game folder after installing the game which available at their site but it is also available on demand (email me).
    You can see the results by clicking here or take a look at this graph directly:

    Although WINRAR has the fastest compression again, 7-Zip's Fastest and 7-Zip's Fast are better than what WINRAR would have accomplished in the same compression time (supposing that the time/size relation is linear.) Strangely, WINRAR's Good is faster than WINRAR's Normal and faster than what 7-Zip would have accomplished in the same compression time.

  3. Dataset 3: pup_save-Tritonio.2fs. I have installed Puppy Linux on my flash drive. This is the persistent storage file. I usually backup this in case it gets corrupted. This Dataset is available on demand (unless I have stored any passwords in there, in that case I will erase them before sending the file).
    You can see the results by clicking here or take a look at this graph directly:

    As always WINRAR offers the fastest possible compression. This time 7-Zip's Fastest offers better compression than what WINRAR would have accomplished in the same compression time. WINRAR's Fast, Normal and Good are better than what 7-Zip would have accomplished in the same compression time. WINRAR's Best is not as good as what 7-Zip would have offered in the same compression time. 7-Zip also offers the highest possible compression.

  4. Dataset 4: QEMU folder. This folders contains QEMU and QEMU Manager as it is available from their site. Since the dataset may contain some of my user settings, it is available on demand.
    You can see the results by clicking here or take a look at this graph directly:

    This time WINRAR is faster than what 7-Zip would have been in the same compression time. Still though 7-Zip offers the highest compression ratio if you are willing to spend some extra time.
I have heard that WINRAR is much faster than 7-Zip. But from what I saw that's not always the case. WINRAR's Fastest is always faster than 7-Zip's Fastest but has a much lower compression ratio. There are cases, though, where 7-Zip offers better ratios than what WINRAR would offer in the same time. Also in every case 7-Zip's Ultra offers the best compression ratio.

So if you don't actually care about the fancy interface and prefer an easier and simpler one and if you don't need the recovery records, why spend $30 on WINRAR when there is an open source alternative offering equally good compression rates and compression times and supports even more compression formats? Why not spend them on The Orange Box instead? :-)

Popular Posts