zlib port in Rust