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

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

A gzip streaming decoder

This structure exposes a Read interface that will consume compressed data from the underlying reader and emit uncompressed data.

Methods

impl<R: Read> DecoderReader<R>

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

Creates a new decoder from the given reader, immediately parsing the gzip header.

If an error is encountered when parsing the gzip header, an error is returned.

fn header(&self) -> &Header

Returns the header associated with this stream.

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