Xz is another piece of software that aims to replace gzip by offering similar options and syntax. It works using the LZMA algorithms, as also used in 7z, so the results should be rather similar.
The confusing thing is that the LZMA algorithms should eat up all the test files we have and generate a good space saving without too much of an increase in time. The numbers, though, tend to indicate otherwise.
The compression results are good and, in the default mode, xz seems to be tweaked to extract more compression than 7z, but the cost of that is a major amount of time. Even if we ignore the figures for the first test, which punishes tools that try to do a good job in time terms, xz fails to inspire in the other tests too. It takes over twice as long as bzip2, for instance, to produce a measly few percent more of space savings.
Due to its single-threaded nature, it also takes nearly twice as long as 7z to produce a file of almost identical size. There is a parallelised version of xz too, pxz, for which we have included separate data in the table at the end.
This does produce some significant time savings, but not to the same extent that lbzip2 manages for the bzip2 algorithm. It manages around a 35% time saving, which is welcome and propels it ahead of the single-thread archivers in terms of speed, but doesn't help it catch up to the other threadaware tools, or even 7z.
As mentioned in our 7z review, the advantage of this app is that it offers good compression and fast decompression times, which is why Slackware began using it for creating packages. That might be a good call for distributing packages, but it isn't a great choice if you're doing the archiving.
Price: Free (GPL)
Mildly disappointing performance from a supposed bzip successor.
Lrzip is relatively new in the world of compression utilities, and is derived from the rzip utility. The focus here is on compressing large files, and lrzip works best on systems that have large amounts of available memory and big files (greater than 100MB) to crunch.
This is because it uses some long-range redundancy checks to compare areas of data in the hopes of being able to save some space. The default method for the actual compression is to use the LZMA algorithms as used by the original 7z and also xz and pxz archivers in this test.
LZMA is rapidly becoming the standard algorithm, in spite of patchy performance with the other utilities that have adopted it. Whatever the secret sauce added to lrzip, it seems to work as it manages to be far faster than the other LZMA-based utilities on large files.
As well as LZMA, you can opt to use the LZO algorithms, which are insanely fast, but don't provide a great compression ratio, or the glacially slow ZPAQ, which gives maximum compression ratios.
The ZPAQ software is available as a standalone too, but it is messy to build yourself. Nevertheless, we've included figures later for comparison.
By use of extreme measures, it seems to be able to produce the most compact archives. It's really more of a proof of concept rather than an everyday compression utility, because of the immense amount of time and resources used to generate the files. The average throughput is only about 170k/second!
The real killer is it takes about as long to decompress. Lrzip manages some reasonable times, good compression and a variety of options, which make it one to watch.
Price: Free (GPL)
Awesome all-round performance and a great candidate for general us.
PeaZip is a little unusual among our selection of archivers. Unlike the others, it's a GUI-driven app that covers a number of archive formats and offers other features besides. There are, of course, tools such as File Roller and Ark on Linux which will do similar jobs and act as frontends for most of the other archiving tools covered here, but PeaZip deserves to be here because it also creates its own archive format.
The PEA file aims to be a modern reinterpretation of the RAR format - a container for different types of compression that can also have different layers added, such as various types of compression, or be split neatly into manageable chunks for distribution.
The native format of the archive is simply a variation on the Zip algorithms. Outside the world of Linux, Zip is still the most widely used archive format, mainly for compatibility reasons. Although PeaZip does handle other formats, we've rated its performance in the table based on creating native PEA files with Zip-style algorithms. Consequently, the performance isn't that great.
It manages to nestle in the top group for speed, but compression ratios are poor, and it's often outperformed on both counts by lbzip2. However, PeaZip behaves nicely and doesn't suck up all your RAM by default, and therefore on more resourcechallenged systems, its performance may look better.
When using the better compression modes available, it's about on a par with 7z. As well as simply archiving, PeaZip can be used as a general file manager, and is available skinned for both GTK/ Gnome and KDE desktops. It may be more aimed at Windows users, but it is open source and has lots of Linux love.
Price: Free (LGPL) Certainly a useful tool that works well with KDE and Gnome.
Conceived in the '90s, the ARJ format took a while to catch on, but became a major one for some types of archiving. Like RAR, it supports easy file splitting for archiving onto disks or, more often, for splitting files up for ease of use transferring or distributing them.
The original arj software was written for DOS, but soon became a full desktop app for Windows systems, and most of its usage is on that platform. An open source version of the software was created, which naturally found its way to Linux, and although the format has never been particularly popular for pure Linux uses, it has advantages for cross-platform file transfers.
Our results show that this software sits firmly in the camp of getting the job done quickly, but that this comes at the cost of not doing a great deal of compression. On the second test it was only marginally slower that the superspeedy gzip, but it also recorded the worst space savings for the last two tests.
That it doesn't put in a better performance than the standard gzip software on Unix systems is probably one of the reasons you will rarely find anyone using it on Linux machines, although it is nevertheless still maintained and available in just about every Linux distro.
In the battle with the RAR format, arj held its own for a long time, but in the last few years, even the commercial version has had minimal updates, and it is safe to say that this format is certainly on the endangered list.
It's nice to know that it exists, but it isn't for everyday use. Even for the splitting and distribution of files to Windows, the RAR format is a much better bet.
Price: Free (GPL) The archiver that time forgot and only really useful for legacy support.
The best Linux compression tool is... lrzip 9/10
Our first conclusion from all the data gathered for this test is that if you have multiple cores in your Linux box, you should really check out one of the threaded tools available. On a two-core machine it will make a significant difference. With more than two, it could change your world view.
As far as the tests themselves go, the first one is a bit of a stinker, because no matter what algorithm you use, it's never going to be able to compress much of what is already highly compressed data. The only thing harder to compress is pure random data, which is why we avoided that here.
The arj and RAR utilities, it soon becomes obvious, are really only useful for our Windows cousins, or for exchanging files with them via email. As for the more Linux-y tools, one of the surprises is how well the old-timer tools do.
Bzip2 (along with the thread-aware lbzip2 variant) and gzip do a pretty good job of archiving, and they manage to do it incredibly fast - there isn't a great deal of difference between archiving a file with them or simply copying it, which can be useful for all sorts of reasons.
PeaZip deserves an honourable mention for being easy to use and for providing a front-end to a lot of these utilities.
Then there's the LZMA-based tools, which may seem to be the future. It was a little surprising that the generic 7z tool seems to do better than the Slackwarefavoured xz/pxz. For applications where the speed of decompressing the output is paramount, they're clearly out in front.
In that case, nothing beats pxz, apart from gzip itself. For all-round performance, the winner should be lrzip, though, which combines the popular LZMA algorithm into a fast and space-savingly great too, which is why it comes out top here.
First published in Linux Format Issue 142
Liked this? Then check out Best Linux blogging software: 8 clients tested
Sign up for TechRadar's free Weird Week in Tech newsletter
Get the oddest tech stories of the week, plus the most popular news and reviews delivered straight to your inbox. Sign up at http://www.techradar.com/register