A pure Rust implementation of the Brotli compression algorithm with optional no-stdlib support for embedded and kernel use.
rust-brotli is a Rust library that implements the Brotli compression and decompression algorithm. It provides a safe, efficient way to compress and decompress data in Rust applications, with optional support for environments without the standard library. The library is designed to be bitwise-identical to the original C implementation, ensuring compatibility with existing Brotli tools and formats.
Rust developers working on performance-sensitive applications, embedded systems, kernels, or projects requiring Brotli compression without C dependencies. It's also suitable for C/C++ developers looking for a drop-in replacement via its FFI interface.
Developers choose rust-brotli for its no-stdlib capability, making it ideal for constrained environments, and its full compatibility with the Brotli standard. The Rust implementation offers memory safety and modern tooling while matching the performance and output of the canonical C version.
Brotli compressor and decompressor written in rust that optionally avoids the stdlib
Operates without the Rust standard library, enabling use in embedded systems and kernels, as demonstrated by the manual memory management example with custom allocators.
Provides a drop-in C API replacement for Google's Brotli library, allowing seamless integration into existing C/C++ projects, with build instructions in the c subdirectory.
Supports appendable and catable streams for efficient data concatenation in streaming scenarios, with detailed parameter interactions and tooling like catbrotli.
Allows fine-grained memory management with custom allocators, essential for performance-critical or resource-constrained environments, as shown in the no-stdlib setup.
Manual memory management requires verbose boilerplate code for allocators and state handling, making it less accessible for simple use cases compared to higher-level APIs.
Frequent major version updates (e.g., 8.0.0, 7.0.0) with fixes like memory leaks indicate potential instability and migration effort for long-term projects.
FFI is not enabled by default to avoid ODR issues, and past memory leaks (fixed in 8.0.2) require careful configuration, adding integration complexity.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.