Comparison of gzip, bzip2, xz

From Thomas-Krenn-Wiki
Jump to navigation Jump to search

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
  • smaller exercises
  • logs
  • smaller files
  • medium-sized files
  • big files
  • archiving
  • software distribution

More information

  • gzip (de.wikipedia.org)
  • bzip2 (de.wikipedia.org)
  • xz (de.wikipedia.org)


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.


Related articles

NVMe physical block size
OpenVPN basics
Permanently set Linux monitor resolution for headless operation