pub struct Deflate;Available on crate features
compression and flate only.Expand description
A CompressionFormat corresponding to the DEFLATE compression algorithm.
Implemented using the flate2 crate.
Trait Implementations§
Source§impl CompressionFormat for Deflate
impl CompressionFormat for Deflate
Source§type Encoder<W: Write> = DeflateEncoder<W>
type Encoder<W: Write> = DeflateEncoder<W>
The encoder wrapper type that compresses data sent to the contained writer.
Source§type Decoder<R: Read> = DeflateDecoder<R>
type Decoder<R: Read> = DeflateDecoder<R>
The decoder wrapper type that decompresses data sent from the contained reader.
Source§fn encode_writer<W: Write>(
&self,
writer: W,
compression: u32,
) -> Self::Encoder<W>
fn encode_writer<W: Write>( &self, writer: W, compression: u32, ) -> Self::Encoder<W>
Wraps a writer that takes uncompressed data, producing a new writer that outputs compressed data.
Source§fn decode_reader<R: Read>(&self, reader: R) -> Self::Decoder<R>
fn decode_reader<R: Read>(&self, reader: R) -> Self::Decoder<R>
Wraps a reader that takes compressed data, producing a new reader that outputs uncompressed data.
Source§impl CompressionFormatLevels for Deflate
impl CompressionFormatLevels for Deflate
Source§const COMPRESSION_LEVEL_NONE: u32 = 0
const COMPRESSION_LEVEL_NONE: u32 = 0
The level for no compression.
Source§const COMPRESSION_LEVEL_FAST: u32 = 1
const COMPRESSION_LEVEL_FAST: u32 = 1
The level for ‘fast’ compression.
Source§const COMPRESSION_LEVEL_BEST: u32 = 9
const COMPRESSION_LEVEL_BEST: u32 = 9
The level for ‘best’ compression.
Source§const COMPRESSION_LEVEL_DEFAULT: u32 = 6
const COMPRESSION_LEVEL_DEFAULT: u32 = 6
The level for default compression.
impl Copy for Deflate
impl Eq for Deflate
impl StructuralPartialEq for Deflate
Auto Trait Implementations§
impl Freeze for Deflate
impl RefUnwindSafe for Deflate
impl Send for Deflate
impl Sync for Deflate
impl Unpin for Deflate
impl UnsafeUnpin for Deflate
impl UnwindSafe for Deflate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more