Comparison of gzip, bzip2, xz
Several tools are available under Linux for lossless data compression: gzip, bzip2 and xz. These tools are often used together with the archiving program. Information on the exact use on the command line can be found in the article Archives under Linux (tar, gz, bz2, zip).
Comparison
| gzip (GNU zip) | bzip2 | xz | |
|---|---|---|---|
| compression algorithm | LZ77 | Burrows-Wheeler Transformation +
Huffman-Encoding |
LZMA |
| extension | .gz | .bz2 | .xz |
| compression rate | gut | higher | highest |
| CPU capacity utilization | low | medium | high |
| speed (compress) | low | medium | slow |
| speed(unpack) | low | slow | medium |
| archiving & compression with tar | tar -czf gzip.tar.gz files | tar -cjf bzip2.tar.bz2 files | tar -cJf xz.tar.xz files |
| areas of application |
|
|
|
More information
|
Author: Werner Fischer Werner Fischer, working in the Knowledge Transfer team at Thomas-Krenn, completed his studies of Computer and Media Security at FH Hagenberg in Austria. He is a regular speaker at many conferences like LinuxTag, OSMC, OSDC, LinuxCon, and author for various IT magazines. In his spare time he enjoys playing the piano and training for a good result at the annual Linz marathon relay.
|
|
Translator: Alina Ranzinger Alina has been working at Thomas-Krenn.AG since 2024. After her training as multilingual business assistant, she got her job as assistant of the Product Management and is responsible for the translation of texts and for the organisation of the department.
|


