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 | |
|---|---|
| LZ4 | Focused on compression and decompression speed |
| Zstandard | Fast compression algorithm, providing high compression ratios |
| brotli | Generic-purpose lossless compression algorithm |
| lzop | File compressor favoring speed over compression ratio |
| pigz | Parallel implementation of gzip |
| ouch | CLI tool for compressing and decompressing for various formats |
| pixz | Parallel, indexed xz compressor |
| gzip | Provides the standard GNU file compression utilities |
| BZip3 | Spiritual successor to BZip2 |
| bzip2 | Freely available, patent free, high-quality data compressor |
| PBZIP2 | Parallel implementation of bzip2 |
| lrzip | Achieve very high compression ratios and speed when used with large files |
| lbzip2 | Multi-threaded implementation of bzip2, suited for serial and parallel processing |
| ZXC | High-performance lossless compression library and command-line tool |
| plzip | Massively parallel lossless data compressor |
| p7zip-zstd | p7zip fork with additional codecs and improvements |
| 7-Zip | File archiver with a high compression ratio |
| ncompress | Fast, simple LZW file compressor |
| PXZ | Runs LZMA compression on multiple cores and processors |
| crabz | Like pigz but written in Rust |
| Lzip | Lossless data compressor aimed at Unix-like systems |
| cmix | Optimize compression ratio at the cost of high CPU/memory usage |
| bsc | High-performance block-sorting compressor for large files |
| rapidgzip | Parallelized decompression of gzip files |
| Kanzi | Modular lossless compressor with multithreaded processing |
Read our verdict in the software roundup.
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. |


Please read our Comment Policy before commenting.