Bug: 170759415

Clone this repo:
  1. c5bf921 Adding bluetooth apex am: 68ed6c6d0d am: c02cb1ee15 am: d80c881bfa by Roopa Sattiraju · 5 months ago master
  2. d80c881 Adding bluetooth apex am: 68ed6c6d0d am: c02cb1ee15 by Roopa Sattiraju · 5 months ago
  3. c02cb1e Adding bluetooth apex am: 68ed6c6d0d by Roopa Sattiraju · 5 months ago
  4. 68ed6c6 Adding bluetooth apex by Roopa Sattiraju · 5 months ago android-s-qpr3-beta-1 android-s-v2-beta-3 android-t-preview-1 android-s-qpr3-beta-1 android-s-v2-beta-3 android-t-preview-1 android-t-preview-2
  5. 978f1ea Merge "Refresh Android.bp, cargo2android.json, TEST_MAPPING." am: 08002afc50 am: 6179ba6967 am: 3e3d5a03a8 by Joel Galenson · 5 months ago


A common library for linking libz to rust programs (also known as zlib).


High-level API

This crate provides bindings to the raw low-level C API. For a higher-level safe API to work with DEFLATE, zlib, or gzip streams, see flate2. flate2 also supports alternative implementations, including slower but pure Rust implementations.


This crate supports building either the high-performance zlib-ng (in zlib-compat mode), or the widely available stock zlib.

By default, libz-sys uses stock zlib, primarily because doing so allows the use of a shared system zlib library if available.

Any application or library designed for zlib should work with zlib-ng in zlib-compat mode, as long as it doesn‘t make assumptions about the exact size or output of the deflated data (e.g. “compressing this data produces exactly this many bytes”), and as long as you don’t also dynamically pull in a copy of stock zlib (which will produce conflicting symbols). Nonetheless, for maximum compatibility, every library crate in a build must opt into allowing zlib-ng; if any library crate in your dependency graph wants stock zlib, libz-sys will use stock zlib.

Library crates depending on libz-sys should use:

libz-sys = { version = "1.1.0", default-features = false, features = ["libc"] }

(Omit the libc feature if you don't require the corresponding functions.)

This allows higher-level crates depending on your library to opt into zlib-ng if desired.

Building zlib-ng requires cmake.


This project is licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in libz-sys by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.