bzip2 crate switches from C to 100% rust
CRANK

Today we published bzip2 version 0.6.0, which uses our rust implementation of the bzip2 algorithm, libbz2-rs-sys, by default. The bzip2 crate is now faster and easier to cross-compile.The libbz2-rs-sys crate can also be built as a C dynamic library, if you have a C project that would benefit from these improvements.Why though?Why bother working on this algorithm from the 90s that sees very little use today? The thing is that many protocols and libraries still need to support bzip2 to be compliant with their specification, so many project still, deep down in their dependency tree, depend on bzip2. We've used our experience from zlib-rs to modernize the bzip2 implementation.We've previously written about the implementation details of libbz2-rs-sys in "Translating bzip2 with c2rust", now let's look at the benefits of this work.Improved performanceOur rust implementation generally outperforms the C implementation, though there are a couple of cases where we only match C performance. We ar…

trifectatech.org
Related Topics: Rust