You can adjust the dictionary size for creating an archive, so you can trade off speed for compression if you wish.
Printable View
When I was running Windows I used .RAR almost exclusively, it was just sooooo much better than the pathetic compression of .ZIP. Then again, I used a cracked version of WinRAR so I didn't give a damn about cost.
When I moved to Linux I wanted to reduce my dependancy on cracked/warez products, but I still wanted to be able to unpack .RAR files. So, I use unrar pretty easily without cost. I have yet to encounter a .RAR file that cannot be accessed in Linux.
Unfortunately we cannot exist in a bubble; if other people want to use .RAR files (eg. Usenet), so be it. I still will use the command-line rar software to access said files, and I don't see the harm.
EDIT: To me, it makes the same sense to get annoyed with .wmv files. Boo hoo, the world uses them, and I want to view them, so I install the necessary codecs and get on with it. Idealism will only get you so far.
If you do that, you throw out the reason why 7zip is superior to the other formats.
IMO, it works out to this:
7zip: Very sparingly used on any platform, very slow for good compression, very good compression
rar: More prevalent on Windows systems, newest versions nonfree,moderate compression speed, moderate compression
zip: All over the place, good compression speed, poor compression
tar & bzip2 or gzip: More prevalent on Linux systems, good compression speed, moderate compression
rar is a good middleground since it's easy enough for most users to decompress. Windows users will complain if you give them a tar.gz or tar.bz2. Most people don't know what to do with .7z files and even if they do, decompression is often also painfully slow. zip is by far the most widely used but the compression is horrid.
As for rar-nonfree, I think I'll try 3.51 and using the PCA key they gave out and see how that goes...
Ed: And now I have a fully working, registered rar 3.51
Here's my take on the compression formats.
Zip
FOSS extraction: Yes
FOSS archiving: Yes
Compression ratio: Low
Software support: Very high
Description: Zip is one of the oldest and most well-known formats. It's not very flexible or very good at compression, but support (though the permissively licensed zlib) is near universal across operating systems and platforms. It's a very good 'baseline' format, but there are better formats for compression or archiving.
RAR
FOSS extraction: Limited, only up to RAR 2.0
FOSS archiving: No
Compression ratio: High
Software support: Medium
Description: RAR is the most well-known competitor to Zip. It has the advantages of being more flexible and having much better compression than Zip, but archiving and (generally) extraction require code under proprietary licensing conditions, making it somewhat unpopular among users for FOSS operating systems.
gzip
FOSS extraction: Yes
FOSS archiving: Yes
Compression ratio: Low
Software support: High
Description: Essentially, gzip is very similar to Zip. It has about the same compression ratio and compression speed. The main difference is that gzip is normally used in a tar container, giving it flexibility more similar to RAR. With the relatively high software support and the fact that it's an open standard, it'd seem like the perfect replacement for Zip, but it hasn't caught on much outside of the Linux world.
bzip2
FOSS extraction: Yes
FOSS archiving: Yes
Compression ratio: Medium-high
Software support: Medium-high
Description: bzip2 is typically used in a tar container (like gzip) and thus has about the same level of flexibility. The big difference between the two is that bzip2 has a much higher compression ratio (not far off RAR) making it a good choice for FOSS users who want better compression. Like gzip though, it hasn't caught on much outside of the Linux world despite being an open standard with good support. Incidentally, bzip (the predecessor to bzip2) actually had better compression as it used arithmetic coding rather than Huffman coding, but this had to be changed due to arithmetic coding being rather patent-encumbered (a situation which looks set to continue for some time).
7z
FOSS extraction: Yes
FOSS archiving: Yes
Compression ratio: Very high
Software support: Medium
Description: 7z is a relative newcomer, but has quickly gained support due to an excellent compression ratio (generally even higher than RAR), plenty of features, and the fact that everything related to it is licensed under the relatively permissive LGPL. With the file format being stable now and software support fairly good, it looks like 7z could be the compression format to topple RAR someday.
Personally, I tend to use gzip or bzip2 for my compression needs. I don't like people using RAR, as it seems rather unnecessary these days. 7z is better if you really need high compression, but why do most people even need such compression? Hard drive space is cheap and abundant these days, and broadband internet connections are hardly more expensive. If you're transferring data on a peer-to-peer basis, gzip should be all you need.
7z is superior to rar and every other archiving format, hands down.
Rhapsody,
Thanks for the very informative summary. I think I may end up doing more in .bzip2 now as opposed to just .zip and tar.gz.
in windows... WinRAR is shareware, adn its supposted to expire after a certain amount of time i think but it never expires on my computer (using a non cracked version too)... so im like whatever.
And the compression ratio really has to do with the file you are trying to compress... certain types of files compress very very very well, while others (movies for one) dont compress well at all.
I will have to check out 7z, didnt know it was better at compressing then RAR
and also a question, does any other format besides RAR support passworded archives?
I thought you could password a ZIP archive, but I'm probably wrong.
Huh. In the overall scheme of things, I never ever worried about having to shave X amount of megs off of a file, so I never gave a flying rat's patootie about it. It just always pissed me off that I had zip already and everyone else was using 4 different varieties of compression, touting the compression characteristics. And I'd be like, "Dude, I'd already have uncompressed this bad boy if you weren't so 1337. Now I got to go download something. Thanks." Compression aside, the fastest version is the version everyone has.
Just to see if .rar really is more efficient, I compressed the Canterbury Corpus (normally 2.7 MB) with rar with the option -m5 (best compression), rar with normal compression, bzip2 (after making a tar archive of it because of bzip2's behaviour), zip with the option -9, zip with normal compression, and 7zip.
After throwing all the compressed archives in a directory and runningWhich lists the size of a file in bytes and then the filename, and sorts the files in descending order by size, I getCode:ls -lS | awk '{print $5, $8}'
7zip did the most poorly (which makes me wonder if I didn't commit a methodological error, since that contradicts most people's reports here), and rar did the best. Zip produced the least noticeable differences in compression between the normal setting and the best setting.Code:977243 canterbury.7z
735262 canterbury.zip
732225 canterbury.9.zip
570856 cantrbry.tar.bz2
517862 canterbury.normal.rar
414371 canterbury.m5.rar