Lines Matching full:compression
1 //! A DEFLATE-based stream compression/decompression library
3 //! This library provides support for compression and decompression of
31 //! dependencies links the original zlib so you cannot use zlib-ng-compat. The compression ratios
48 //! use flate2::Compression;
54 //! let mut encoder = GzEncoder::new(Vec::new(), Compression::default());
154 /// When compressing data, the compression level can be specified by a value in
157 pub struct Compression(u32); struct
159 impl Compression { impl
160 /// Creates a new description of the compression level with an explicitly
164 /// compression" and 9 means "take as long as you'd like".
165 pub const fn new(level: u32) -> Compression { in new() argument
166 Compression(level) in new()
169 /// No compression is to be performed, this may actually inflate data
171 pub const fn none() -> Compression { in none()
172 Compression(0) in none()
176 pub const fn fast() -> Compression { in fast()
177 Compression(1) in fast()
181 pub const fn best() -> Compression { in best()
182 Compression(9) in best()
185 /// Returns an integer representing the compression level, typically on a
192 impl Default for Compression { implementation
193 fn default() -> Compression { in default()
194 Compression(6) in default()