| Crates.io | bz2zstd |
| lib.rs | bz2zstd |
| version | 0.2.0 |
| created_at | 2025-12-06 16:39:26.932236+00 |
| updated_at | 2025-12-11 19:39:22.119229+00 |
| description | High-performance bzip2 to zstd converter |
| homepage | https://github.com/parallel-bz2/parallel-bz2 |
| repository | https://github.com/parallel-bz2/parallel-bz2 |
| max_upload_size | |
| id | 1970402 |
| size | 36,307 |
A high-performance, parallel bzip2 decompressor and bzip2-to-zstd converter written in Rust. It utilizes multiple CPU cores to decompress both single-stream (standard) and multi-stream (e.g., pbzip2) bzip2 files by detecting bzip2 blocks and processing them in parallel.
It also supports direct conversion to Zstandard (zstd), allowing for efficient re-compression of large datasets in a single pass.
rayon.parallel_bzip2_decoder crate for integration into other projectsgit clone https://github.com/parallel-bz2/parallel-bz2.git
cd parallel-bz2
cargo build --release
The binary will be available at target/release/bz2zstd.
cargo install bz2zstd
The core parallel decompression logic is available as a standalone library crate: parallel_bzip2_decoder.
[dependencies]
parallel_bzip2_decoder = { path = "parallel_bzip2_decoder" }
See parallel_bzip2_decoder/README.md for more details.
git clone <repository_url>
cd parallel-bz2
cargo build --release
The binary will be available at target/release/bz2zstd.
./bz2zstd input.bz2
<INPUT>: Input bzip2 file.-o, --output <FILE>: Output file (optional, defaults to input file with .bz2 replaced by .zst).-z, --zstd-level <LEVEL>: Set zstd compression level (default: 9, e.g., -z 9).-j, --jobs <N>: Number of threads to use (default: number of logical cores).--benchmark-scan: Benchmark mode: Only run the scanner and exit.We welcome contributions! Please see our contributing guidelines for details on how to get started.
To run tests:
cargo test
To run benchmarks:
cargo bench
To run with profiling (see ./scripts/ for profiling scripts):
./scripts/profile_cpu.sh
MIT
This project uses and was inspired by various other bzip2 decompression tools and libraries in the ecosystem.