Struct flate2::read::DeflateDecoder [-] [+] [src]

pub struct DeflateDecoder<R: Read> {
    // some fields omitted
}

A DEFLATE decoder, or decompressor.

This structure implements a Read interface and takes a stream of compressed data as input, providing the decompressed data when read from.

Methods

impl<R: Read> DecoderReader<R>

fn new(r: R) -> DecoderReader<R>

Creates a new decoder which will decompress data read from the given stream.

fn new_with_buf(r: R, buf: Vec<u8>) -> DecoderReader<R>

Same as new, but the intermediate buffer for data is specified.

Note that the capacity of the intermediate buffer is never increased, and it is recommended for it to be large.

fn into_inner(self) -> R

Consumes this decoder, returning the underlying reader.

Trait Implementations

impl<R: Read> Read for DecoderReader<R>

fn read(&mut self, into: &mut [u8]) -> Result<usize>

fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>

fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

fn by_ref(&mut self) -> &mut Self

fn bytes(self) -> Bytes<Self>

fn chars(self) -> Chars<Self>

fn chain<R>(self, next: R) -> Chain<Self, R> where R: Read

fn take(self, limit: u64) -> Take<Self>

fn tee<W>(self, out: W) -> Tee<Self, W> where W: Write