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.