Struct flate2::write::DeflateDecoder [] [src]

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

A DEFLATE decoder, or decompressor.

This structure implements a Write and will emit a stream of decompressed data when fed a stream of compressed data.

Methods

impl<W: Write> DecoderWriter<W>
[src]

Creates a new decoder which will write uncompressed data to the stream.

When this encoder is dropped or unwrapped the final pieces of data will be flushed.

Resets the state of this decoder entirely, swapping out the output stream for another.

This function will finish encoding the current stream into the current output stream before swapping out the two output streams. If the stream cannot be finished an error is returned.

This will then reset the internal state of this decoder and replace the output stream with the one provided, returning the previous output stream. Future data written to this decoder will be decompressed into the output stream w.

Consumes this encoder, flushing the output stream.

This will flush the underlying data stream and then return the contained writer if the flush succeeded.

Returns the number of bytes that the decompressor has consumed for decompression.

Note that this will likely be smaller than the number of bytes successfully written to this stream due to internal buffering.

Returns the number of bytes that the decompressor has written to its output stream.

Trait Implementations

impl<W: Write> Write for DecoderWriter<W>
[src]

Write a buffer into this object, returning how many bytes were written. Read more

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

Attempts to write an entire buffer into this write. Read more

Writes a formatted string into this writer, returning any error encountered. Read more

Creates a "by reference" adaptor for this instance of Write. Read more