pub struct BzEncoder<W> { /* private fields */ }
futures-io
and bzip2
only.Expand description
A bzip2 encoder, or compressor.
This structure implements an AsyncWrite
interface and will
take in uncompressed data and write it compressed to an underlying stream.
Implementations
Creates a new encoder which will take in uncompressed data and write it compressed to the given stream.
Creates a new encoder which will take in uncompressed data and write it compressed to the given stream.
Acquires a reference to the underlying writer that this encoder is wrapping.
Acquires a mutable reference to the underlying writer that this encoder is wrapping.
Note that care must be taken to avoid tampering with the state of the writer which may otherwise confuse this encoder.
Acquires a pinned mutable reference to the underlying writer that this encoder is wrapping.
Note that care must be taken to avoid tampering with the state of the writer which may otherwise confuse this encoder.
Consumes this encoder returning the underlying writer.
Note that this may discard internal state of this encoder, so care should be taken to avoid losing resources when this is called.