A complete, memory-safe Rust translation of the zlib compression library (version 1.3.1).
This translation was created by Asari AI. For details on how this translation was produced, see the accompanying blog post. This version was translated using a more direct 1-to-1 approach that preserves the functionality of the original C code structure while converting to safe Rust patterns.
- 100% Safe Rust: Zero unsafe code blocks (
#![forbid(unsafe_code)]enforced) - Complete API: Full coverage of the zlib API including compression, decompression, gzip I/O, and checksums
- Zero Dependencies: Pure Rust implementation with no external dependencies
- Thoroughly Tested: Test cases cover core functionality and edge cases. Run with
cargo test
Add to your Cargo.toml:
[dependencies]
zlib = { git = "https://github.com/Asari-AI/zlib-safe-rust" }This project is licensed under the Apache License 2.0. See the LICENSE file for details.
This project is a Rust translation of zlib.
zlib is Copyright (c) Jean-loup Gailly and Mark Adler and is licensed under the zlib license.