Struct flate2::write::GzEncoder [-] [+] [src]

pub struct GzEncoder<W: Write> {
    // some fields omitted
}

A gzip streaming encoder

This structure exposes a Write interface that will emit compressed data to the underlying writer W.

Methods

impl<W: Write> EncoderWriter<W>

fn new(w: W, level: Compression) -> EncoderWriter<W>

Creates a new encoder which will use the given compression level.

The encoder is not configured specially for the emitted header. For header configuration, see the Builder type.

The data written to the returned encoder will be compressed and then written to the stream w.

fn finish(self) -> Result<W>

Finish encoding this stream, returning the underlying writer once the encoding is done.

Trait Implementations

impl<W: Write> Write for EncoderWriter<W>

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

fn flush(&mut self) -> Result<()>

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>

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

fn broadcast<W>(self, other: W) -> Broadcast<Self, W> where W: Write

impl<W: Write> Drop for EncoderWriter<W>

fn drop(&mut self)