#bzip2 #bindings #streaming #stream #exposed #reader-writer #libbzip2

sys bzip2-sys

Bindings to libbzip2 for bzip2 compression and decompression exposed as Reader/Writer streams

14 releases

Uses old Rust 2015

new 0.1.12+1.0.8 Feb 11, 2025
0.1.11+1.0.8 Jun 9, 2021
0.1.10+1.0.8 Feb 1, 2021
0.1.9+1.0.8 May 27, 2020
0.0.1 Nov 13, 2014

#91 in Compression

Download history 596667/week @ 2024-10-29 593289/week @ 2024-11-05 611871/week @ 2024-11-12 592101/week @ 2024-11-19 475042/week @ 2024-11-26 603574/week @ 2024-12-03 650750/week @ 2024-12-10 521382/week @ 2024-12-17 267217/week @ 2024-12-24 388881/week @ 2024-12-31 664364/week @ 2025-01-07 655404/week @ 2025-01-14 643893/week @ 2025-01-21 655925/week @ 2025-01-28 715326/week @ 2025-02-04 773291/week @ 2025-02-11

2,874,902 downloads per month
Used in 2,283 crates (14 directly)

MIT/Apache

635KB
6K SLoC

C 5.5K SLoC // 0.2% comments XSL 283 SLoC // 0.1% comments Rust 107 SLoC // 0.0% comments Shell 74 SLoC // 0.3% comments Perl 39 SLoC // 0.4% comments

bzip2

Documentation

A streaming compression/decompression library for rust with bindings to libbz2.

Features

By default, bzip2-rs attempts to use the system libbz2. When libbz2 is not available, the library is built from source. A from source build requires a functional C toolchain for your target, and may not work for all targets (in particular webassembly).

libbz2-rs-sys

Since version 0.5.0, this crate also supports using libbz2-rs-sys, a drop-in compatible rust implementation of libbz2. With this feature enabled, cross-compilation should work like any other rust code, and no C toolchain is needed to compile this crate or its dependencies.

bzip2 = { version = "0.5.0", default-features = false, features = ["libbz2-rs-sys"] }

static

Always build libbz2 from C source, and statically link it. This flag is only meaningful when bzip2-sys is used, and has no effect when libbz2-rs-sys is used as the bzip2 implementation.

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this repository by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies