Zlib-rs 0.4.2: A Safer and Faster Rust Implementation Surpassing Cs Zlib

The developers of the Zlib-rs library, which is implemented in Rust, have announced that the 0.4.2 version not only offers enhanced security but also outperforms the Zlib implementation written in C as well as Chromium’s zlib.

“There are numerous performance enhancements. We are now significantly faster than other implementations for inflation (decompression) and have improved speed in the key scenarios for compression,” explained the team from Trifecta Tech Foundation.

“Zlib-rs is quicker than zlib-ng in all cases except for the smallest fragment size. A fragment size of 2^4 = 16 bytes is unlikely to impact performance in practice, as input data can simply be buffered and then decompressed in larger segments. However, we are considerably faster than zlib-ng for more optimal fragment sizes: 10% quicker for 1 KB input data and 6% faster for 65 KB input data. For decompression, the Zlib implementation used in the Chromium project often surpasses zlib-ng in speed. Nevertheless, we have also outperformed it in this benchmark for the most relevant fragment sizes. We have made some improvements in compression as well (thanks to Brian Payne, who contributed numerous PRs in this area), but the results so far have been somewhat mixed,” the Trifecta Tech Foundation added.

As part of its forward-looking development plans while maintaining compatibility with the Zlib API, the project aims to raise €95,000 in funding to complete additional performance enhancement work.