Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. bzip2-rs

bzip2-rs

Apache-2.0Cv0.6.0

Rust bindings for libbz2 providing streaming bzip2 compression and decompression.

GitHubGitHub
172 stars70 forks0 contributors

What is bzip2-rs?

bzip2-rs is a Rust library that provides bindings to the libbz2 C library, enabling streaming bzip2 compression and decompression. It solves the problem of integrating the widely-used bzip2 compression algorithm into Rust applications with a safe and efficient interface.

Target Audience

Rust developers who need to compress or decompress data using the bzip2 algorithm, particularly those working with large datasets or streaming data.

Value Proposition

Developers choose bzip2-rs for its reliable integration with libbz2, flexibility in linking (system or static), and streaming capabilities, making it a robust choice for compression tasks in Rust.

Overview

libbz2 (bzip2 compression) bindings for Rust

Use Cases

Best For

  • Compressing large files in Rust applications
  • Decompressing bzip2 archives in streaming workflows
  • Integrating bzip2 support into cross-platform Rust projects
  • Reducing storage or transmission size with high compression ratios
  • Processing continuous data streams with compression
  • Projects requiring static linking of compression libraries

Not Ideal For

  • Projects targeting webassembly without a C toolchain setup
  • Applications aiming for minimal dependencies and pure Rust implementations
  • Use cases requiring newer, faster compression algorithms like zstd or brotli

Pros & Cons

Pros

Flexible System Integration

Can use the system's libbz2 or build from source, as per the README, offering deployment flexibility without manual library management.

Streaming Data Support

Provides streaming compression and decompression interfaces, enabling efficient handling of large or continuous data streams in Rust.

Safe Rust Bindings

Offers a safe interface to the libbz2 C library, reducing memory unsafety risks compared to direct C FFI usage.

Static Linking Option

Allows static linking of libbz2 via the bzip2-sys feature, simplifying deployment in environments without system libraries.

Cons

WebAssembly Limitations

Limited support for webassembly targets due to C toolchain requirements, as noted in the README, making it less suitable for web-based projects.

C Toolchain Dependency

Requires a functional C toolchain for building from source, complicating setup and increasing build times, especially on non-standard platforms.

Static Linking Complexity

Static linking is only available with the bzip2-sys feature and may introduce configuration overhead, as highlighted in the README's feature notes.

Frequently Asked Questions

Quick Stats

Stars172
Forks70
Contributors0
Open Issues13
Last commit7 months ago
CreatedSince 2014

Tags

#bzip2#bindings#streaming#cross-platform#data-processing#compression#rust

Built With

R
Rust
C
C++

Included in

Rust56.6k
Auto-fetched 7 hours ago

Related Projects

flate2-rsflate2-rs

DEFLATE, gzip, and zlib bindings for Rust

Stars1,123
Forks203
Last commit2 days ago
rust-brotlirust-brotli

Brotli compressor and decompressor written in rust that optionally avoids the stdlib

Stars943
Forks108
Last commit5 days ago
tar-rstar-rs

Tar file reading/writing for Rust

Stars736
Forks244
Last commit7 days ago
zstd-rszstd-rs

A rust binding for the zstd compression library.

Stars653
Forks136
Last commit2 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub