Lines Matching +full:zlib +full:- +full:level
1 //! A DEFLATE-based stream compression/decompression library
4 //! DEFLATE-based streams:
7 //! * the zlib format
19 //! * `default`, or `rust_backend` - this implementation uses the `miniz_oxide`
23 //! * `zlib` - this feature will enable linking against the `libz` library, typically found on most
29 //! compiler at build time. `zlib-ng-compat` is useful if you're using zlib for compatibility but
30 //! want performance via zlib-ng's zlib-compat mode. `zlib` is useful if something else in your
31 //! dependencies links the original zlib so you cannot use zlib-ng-compat. The compression ratios
53 //! # fn run() -> io::Result<()> {
61 //! Other various types are provided at the top-level of the crate for
68 //! # About multi-member Gzip files
74 //! provide partial results when a multi-member gzip file is encountered. `GzDecoder` is appropriate
75 //! for data that is designed to be read as single members from a multi-member file. `bufread::GzDe…
76 //! and `write::GzDecoder` also allow non-gzip data following gzip data to be handled.
80 //! If a file contains contains non-gzip data after the gzip data, MultiGzDecoder will
87 //! [read]: https://doc.rust-lang.org/std/io/trait.Read.html
88 //! [write]: https://doc.rust-lang.org/std/io/trait.Write.html
89 //! [bufread]: https://doc.rust-lang.org/std/io/trait.BufRead.html
100 compile_error!("You need to choose a zlib backend");
115 mod zlib; module
126 /// [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
127 /// [`BufReader`]: https://doc.rust-lang.org/std/io/struct.BufReader.html
134 pub use crate::zlib::read::ZlibDecoder;
135 pub use crate::zlib::read::ZlibEncoder;
141 /// [`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
148 pub use crate::zlib::write::ZlibDecoder;
149 pub use crate::zlib::write::ZlibEncoder;
155 /// [`BufRead`]: https://doc.rust-lang.org/std/io/trait.BufRead.html
162 pub use crate::zlib::bufread::ZlibDecoder;
163 pub use crate::zlib::bufread::ZlibEncoder;
184 /// When compressing data, the compression level can be specified by a value in
190 /// Creates a new description of the compression level with an explicitly
193 /// The integer here is typically on a scale of 0-9 where 0 means "no
195 pub const fn new(level: u32) -> Compression { in new()
196 Compression(level) in new()
201 pub const fn none() -> Compression { in none()
206 pub const fn fast() -> Compression { in fast()
211 pub const fn best() -> Compression { in best()
215 /// Returns an integer representing the compression level, typically on a
216 /// scale of 0-9
217 pub fn level(&self) -> u32 { in level() method
223 fn default() -> Compression { in default()
229 fn random_bytes() -> impl Iterator<Item = u8> { in random_bytes()