3 releases

0.1.2 Feb 16, 2021
0.1.1 Jan 31, 2021
0.1.0 Jan 30, 2021

#161 in Compression

Download history 261/week @ 2024-06-09 412/week @ 2024-06-16 415/week @ 2024-06-23 611/week @ 2024-06-30 623/week @ 2024-07-07 535/week @ 2024-07-14 448/week @ 2024-07-21 673/week @ 2024-07-28 374/week @ 2024-08-04 894/week @ 2024-08-11 526/week @ 2024-08-18 730/week @ 2024-08-25 746/week @ 2024-09-01 763/week @ 2024-09-08 978/week @ 2024-09-15 911/week @ 2024-09-22

3,466 downloads per month
Used in 13 crates (11 directly)

MIT/Apache

255KB
1K SLoC

bzip2-rs

crates.io Documentation dependency status Rustc Version 1.34.2+ CI

Pure Rust 100% safe bzip2 decompressor.

Features

  • Default features: Rust >= 1.34.2 is supported
  • rustc_1_37: bump MSRV to 1.37, enable more optimizations
  • nightly: require Rust Nightly, enable more optimizations

Usage

use std::fs::File;
use std::io;
use bzip2_rs::DecoderReader;

let mut compressed_file = File::open("input.bz2")?;
let mut decompressed_output = File::create("output")?;

let mut reader = DecoderReader::new(compressed_file);
io::copy(&mut reader, &mut decompressed_output)?;

Upcoming features

  • parallel decoding support (similar to pbzip2)
  • bzip2 encoding support
  • no_std support (is anybody interested with this?)

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

Dependencies