This repository contains a Rust implementation of the zlib file format that is compatible with the zlib API.
This repository contains two public crates:
- zlib-rs, a Rust implementation based on zlib with a safe rust API. This API is under development and still unstable.
- libz-rs-sys, a zlib-compatible C API for usage in non-Rust applications.
zlib-rs can be used in both Rust and C projects.
By far the easiest way to use zlib-rs is through the flate2 crate, by simply enabling the zlib-rs
feature gate. This will enable the zlib-rs
backend.
zlib-rs can be built as a shared object file for usage by C programs that dynamically link to zlib. Please see the example in libz-rs-sys-cdylib.
This project is heavily based on the zlib and zlib-ng projects.
zlib-rs is part of Trifecta Tech Foundation's Data compression initiative.
The initial development of zlib-rs was started and funded by the Internet Security Research Group as part of the Prossimo project.