Saturday, February 14, 2009

7-Zip vs WINRAR

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:


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? :-)


  1. This comment has been removed by a blog administrator.

  2. From what I saw on their website this tool is not freeware, you have to buy it. Also this is quite different from WINRAR's recovery records. This tool recovers undamaged data form the zipfile, WINRAR's recovery records actually repair damaged data in the expense of having bigger archives if you include recovery records in them.

    But I found an excellent tool called Parchive ( that can create "recovery records" for ANY file. So you can use 7-Zip in conjunction with with a version of this program (I prefer PHPar found here: to have the same effect as a RAR archive with recovery records.

  3. Thank you for ur interesting article,but I like to know how to create a self-extracting executable with an embedded file version?

    with 7-zip If It is possible.if not what is the best program for that

  4. Hello Anonymous and thank you for you kind words. I don't understand your question though. What is an "embedded file version"?

  5. Thanx for your fast reply.and sorry for my stupid unclear question.
    I was trying to Create SFX archive with FileVersionInfo as in executable file properties.I wanted to add ProductVersion fileVersion,CompanyName,LegalCopyright and so on to the exe archive for making a portable program for example.This feature isnot available in winrar.I tried to do that with NSIS script and other installer programs but It isnot easy for newbie.
    Thanx for your fast replay.and sorry again for my weak description.

    I mean

  6. Hm... Well I am not aware of any program that allows you to type in that information in the SFX archives it creates. But you could try using Resource Hacker (it's a freeware utility that you can easily find with Google) to edit this information after you create the SFX with the compression utility of your choice. Additionally, if you want to create portable applications this way, you have to make the executable run automatically after the decompression. I think this can be done by using 7-Zip and another SFX module (there are 3 different SFX modules for 7-Zip, console, GUI, and installer). You should read 7-Zip's documentation about SFX archives, it describes how to create installers, and after that edit the installer with Resource Hacker to add the information you want.

    I hope this helps.

    PS: I don't think this is the best way to create portable applications. NSIS scripts are definitely better but they are hard as you said.

  7. interesting, you think you could post your settings for winrar compression?

  8. I used Fastest,Fast,Normal,etc all with solid archives on. There are links like this before every graph that take you to google docs where you can see my settings and the exact numbers.

  9. I have been planning to switch to use RAR format as it has been very popular for much small compression file format.

    After reading your post about the missing recovery record for 7zip format, I feel more comfortable to continue use 7zip.

    I hate RAR just bcos of it no free. Another reason I believe for any medium/media (files) should always stay open -- allowing any converter to use it, openly.

  10. I don't mind free - I don't mind open. I naturally prefer free and open. Pay software has its place. I only mind for profit software if underhanded strong arm attempts are made to block or prohibit the free and open initiatives.

  11. i bought WinRAR years ago and i'm still happy with it, because it's a lifetime license so i have not to care about upgrade fees and so on. but in most cases i'm using now 7zip because it has the better compression ratio, can be used on linux, is opensource, and so far.. what i like on WinRAR and why i'm using it sometimes, is the feature to archive my stuff including the full path with drive letters. what makes it useful for certain backups on identical systems. i also like the ability, to create different profiles and to call them from context menu.

    in most cases, you don't need to use recovery records. but its pretty useful if you use usenet for binaries much. well, for usenet stuff the best thing would be using par/par2 instead of winrar recovery records.

    for skinning 7zip take a look at the 7zip theme manager. 7zip does not support skinning, but the patcher works very well.

  12. I prefer 7-Zip command line program. I once used it to convert CBR to CB7 format and CB7 file is smaller file. WinRAR can still load 7-Zip files, so it should be OK to use 7-Zip and someone using WinRAR instead can still load it.

  13. Hi Tritonio,

    do you know a gui wrapper for both 7zip cmd and phpar2? that would solve the missing recovery record for 7zip. been looking around but cant find one.


  14. I don't think there is one for both. I rarelly need recovery records but when I do I've made a simple script that traverses a directory tree and ads the recovery records for every folder separatelly. I don't think I've published the script anywhere. It's BAT file. Not a GUI. But at least you don't have to remember the command line parameters of phpar2. Of course the directory recursion is redundant when used in conjuction with 7zip since you'll first 7zip everything and then you'll have to put that 7z file into a directory on its own and then use my script. Not the most convenient thing and I think it would be better to make another script to use in conjuction with 7zip. I don't know if I should post my script...

  15. 7zip encryption have bug. If you encrypt file(s) with "encrypt file names" option and update this archive, it removes this encryption, meaning, you still have to provide password when decompress previously compressed files with this method, but now you see what is archived and it don't ask you for password before opening archive as it should.

    WinRAR wins.

  16. 3 types of files that WinRAR's best compresses better than 7-zip's best:

    8-bit and 16-bit ROMs (NES, SNES, GB, GBC, SMS, Genesis)

    Neverwinter Nights 2 modules that do not have any outdoor areas (7-zip blows nearly everything way when it comes to compression ratio on many game 3D data files).

    Old 16-bit DOS/Windows program files.

    7-zip is better with most anything else


Popular Posts