6 releases

0.2.2 Aug 5, 2025
0.2.1 Jun 16, 2025
0.2.0 Apr 16, 2025
0.1.3 Feb 11, 2025
0.1.1 Dec 11, 2024

#61 in Compression

Download history 234707/week @ 2025-09-24 282382/week @ 2025-10-01 284863/week @ 2025-10-08 280436/week @ 2025-10-15 309249/week @ 2025-10-22 336909/week @ 2025-10-29 328528/week @ 2025-11-05 375806/week @ 2025-11-12 377678/week @ 2025-11-19 280539/week @ 2025-11-26 450112/week @ 2025-12-03 551468/week @ 2025-12-10 493493/week @ 2025-12-17 200351/week @ 2025-12-24 358006/week @ 2025-12-31 497888/week @ 2026-01-07

1,640,562 downloads per month
Used in 826 crates (4 directly)

bzip2-1.0.6

230KB
5.5K SLoC

checks codecov Crates.io

libbzip2-rs: a safer libbzip

This repository contains a Rust implementation of the bzip2 file format that is compatible with the libbzip2 API.

This repository contains the following public crate:

How to use libbzip2-rs in your project

libbzip2-rs can be used in both Rust and C projects.

Rust projects

By far the easiest way to use libbzip2-rs is through the bzip2 crate, by simply enabling the libbz2-rs-sys feature gate. This will enable the libbz2-rs-sys backend.

You can also directly use the C api exported by the libbz2-rs-sys crate.

C projects

libbzip2-rs can be built as a shared object file for usage by C programs that dynamically link to libbzip2. Please see the example in libbz2-rs-sys-cdylib.

Acknowledgment

This project is based on a c2rust translation of the original libbzip2.

About

libbzip2-rs is part of Trifecta Tech Foundation's Data compression initiative.

Funding

This project is funded through NGI Zero Core, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program. Learn more at the NLnet project page.

NLnet foundation logo
NGI Zero Logo

Dependencies