commit | 9e008aa1b006202bdd3ed8c884fe69b0b9781fcb | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Wed Jun 15 21:01:06 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Jun 15 21:01:06 2022 +0000 |
tree | 2396b0459bd92a243c5f6fddd17d0950e5394fc9 | |
parent | 29315eca8f21a35e4bd904b801a704ad91506d23 [diff] | |
parent | e313d71c2a578d2bcd1d0a9f787aec9010434bcd [diff] |
Merge "Update TEST_MAPPING" am: b37ab4e3a3 am: e313d71c2a Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/libz-sys/+/2126012 Change-Id: Idf6ab942eba2e80ff0a8d8293f5dae446a9d7145 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
A common library for linking libz
to rust programs (also known as zlib).
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.