#api-bindings #encoding #bzip

bzip2

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

21 releases

0.5.0 Dec 11, 2024
0.4.4 Jan 5, 2023
0.4.3 Jun 9, 2021
0.4.2 Feb 19, 2021
0.0.3 Nov 19, 2014

#11 in Compression

Download history 462437/week @ 2024-09-22 472750/week @ 2024-09-29 503884/week @ 2024-10-06 495289/week @ 2024-10-13 494556/week @ 2024-10-20 493653/week @ 2024-10-27 475620/week @ 2024-11-03 503776/week @ 2024-11-10 483244/week @ 2024-11-17 374064/week @ 2024-11-24 454040/week @ 2024-12-01 543376/week @ 2024-12-08 482540/week @ 2024-12-15 239282/week @ 2024-12-22 319197/week @ 2024-12-29 529250/week @ 2025-01-05

1,596,900 downloads per month
Used in 2,153 crates (226 directly)

MIT/Apache

675KB
6.5K SLoC

C 5K SLoC // 0.2% comments Rust 1K SLoC // 0.0% comments XSL 278 SLoC // 0.1% comments Shell 72 SLoC // 0.3% comments Perl 38 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 source, and statically link it. When libbz2-rs-sys is enabled, static mode is always used.

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