1# libz-ng-sys 2 3A library for linking zlib-ng (`libz-ng`) to Rust programs natively, rather 4than in zlib-compat mode. 5 6zlib-ng is a high-performance implementation of zlib. zlib-ng supports building 7in two modes: zlib-compat mode, in which it provides the same API as zlib and 8generally works as a drop-in replacement, and native mode, in which it provides 9its own API. The native API is almost identical to the zlib-compat API, except 10that some types use more correct sizes (rather than the sizes required for zlib 11compatibility), and the functions all have a `zng_` prefix. The latter allows 12zlib and zlib-ng to coexist in the same program. 13 14This crate provides bindings to the native zlib-ng API. However, for simplicity 15of porting, this crate exports the same API as libz-sys (without the `zng_` 16prefixes), making it easier to write Rust software compatible with both 17libz-sys and libz-ng-sys. 18 19# High-level API 20 21This crate provides bindings to the raw low-level C API. For a higher-level 22safe API to work with DEFLATE, zlib, or gzip streams, see 23[`flate2`](https://docs.rs/flate2). `flate2` supports many different 24implementations. 25 26# Development 27 28This crate is built from [the same sources as 29`libz-sys`](https://github.com/rust-lang/libz-sys). From within those sources, 30`Cargo.toml` is the manifest for `libz-sys`, and `Cargo-zng.toml` is the 31manifest for `libz-ng-sys`. The script `./cargo-zng` invokes Cargo on a 32temporary copy of the sources with `Cargo-zng.toml` replacing `Cargo.toml`; for 33instance, use `./cargo-zng publish` to publish `libz-ng-sys`. 34 35# Minimum Supported Rust Version (MSRV) Policy 36 37This crate uses the same MSRV policy as the 38[`flate2`](https://crates.io/crates/flate2) crate: This crate supports the 39current and previous stable versions of Rust. Older versions of Rust may work, 40but we don't guarantee these will continue to work. 41 42# License 43 44This project is licensed under either of 45 46 * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or 47 https://www.apache.org/licenses/LICENSE-2.0) 48 * MIT license ([LICENSE-MIT](LICENSE-MIT) or 49 https://opensource.org/license/mit/) 50 51at your option. 52 53### Contribution 54 55Unless you explicitly state otherwise, any contribution intentionally submitted 56for inclusion in this crate by you, as defined in the Apache-2.0 license, shall 57be dual licensed as above, without any additional terms or conditions. 58