Compression

bzip2 – block-sorting lossless file compressor

bzip2 is a general-purpose lossless file compressor that uses the Burrows-Wheeler transform and Huffman coding to achieve strong compression ratios. It is particularly effective with text and other data containing repeated patterns.

The program provides a familiar command-line workflow for compressing and decompressing individual files. It normally creates files using the .bz2 extension and is commonly used alongside tar when directories or collections of files need to be archived.

bzip2 also includes a reusable compression library and utilities for examining compressed data. Its block-oriented format offers some opportunities for recovering information from damaged files, although successful recovery depends on the location and extent of corruption.

This is free and open source software.

Key Features

  • Lossless compression using the Burrows-Wheeler transform and Huffman coding.
  • Configurable compression block sizes for balancing compression ratio and memory consumption.
  • Creates .bz2 files compatible with other bzip2 implementations.
  • Provides bunzip2 for decompression and bzcat for writing decompressed data to standard output.
  • Includes bzip2recover for extracting undamaged blocks from corrupted compressed files.
  • Uses CRC checksums to detect damaged compressed blocks.
  • Offers a test mode for checking compressed files without extracting them.
  • Supports compression and decompression through standard streams.
  • Provides options for retaining original input files.
  • Offers a reduced-memory mode for systems with limited available RAM.
  • Reports compression statistics in verbose mode.
  • Includes libbzip2 for integration into applications requiring bzip2 compression.
  • Allows compression and decompression of multiple individually named files.
  • Works with tar to produce compressed archives containing multiple files.

Website: sourceware.org/bzip2
Support:
Developer: Julian R. Seward
License: bzip2 and libbzip2 License v1.0.6

bzip2 is written in C. Learn C with our recommended free books and free tutorials.


Related Software

Compression Tools
LZ4Focused on compression and decompression speed
ZstandardFast compression algorithm, providing high compression ratios
brotliGeneric-purpose lossless compression algorithm
lzopFile compressor favoring speed over compression ratio
pigzParallel implementation of gzip
ouchCLI tool for compressing and decompressing for various formats
pixzParallel, indexed xz compressor
gzipProvides the standard GNU file compression utilities
BZip3Spiritual successor to BZip2
bzip2Freely available, patent free, high-quality data compressor
PBZIP2Parallel implementation of bzip2
lrzipAchieve very high compression ratios and speed when used with large files
lbzip2Multi-threaded implementation of bzip2, suited for serial and parallel processing
ZXCHigh-performance lossless compression library and command-line tool
plzipMassively parallel lossless data compressor
p7zip-zstdp7zip fork with additional codecs and improvements
7-ZipFile archiver with a high compression ratio
ncompressFast, simple LZW file compressor
PXZRuns LZMA compression on multiple cores and processors
crabzLike pigz but written in Rust
LzipLossless data compressor aimed at Unix-like systems
cmixOptimize compression ratio at the cost of high CPU/memory usage
bscHigh-performance block-sorting compressor for large files
rapidgzipParallelized decompression of gzip files
KanziModular lossless compressor with multithreaded processing

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted