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 //! * `miniz-sys` - when enabled this feature will enable this crate to instead
24 //! use `miniz.c`, distributed with `miniz-sys`, to implement
27 //! * `zlib` - finally, this feature will enable linking against the `libz`
34 //! selected to avoid the need for a C compiler at build time. The `miniz-sys`
36 //! needed, and `zlib` is often useful if you're already using `zlib` for other
59 //! # fn run() -> io::Result<()> {
67 //! Other various types are provided at the top-level of the crate for
77 //! [read]: https://doc.rust-lang.org/std/io/trait.Read.html
78 //! [write]: https://doc.rust-lang.org/std/io/trait.Write.html
79 //! [bufread]: https://doc.rust-lang.org/std/io/trait.BufRead.html
96 //! [`ErrorKind::WouldBlock`]: https://doc.rust-lang.org/std/io/enum.ErrorKind.html
123 mod zlib; module
128 /// [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
135 pub use crate::zlib::read::ZlibDecoder;
136 pub use crate::zlib::read::ZlibEncoder;
142 /// [`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()