pub struct BzEncoder<R> { /* private fields */ }
tokio
and bzip2
only.Expand description
A bzip2 encoder, or compressor.
This structure implements an AsyncRead
interface and will
read uncompressed data from an underlying stream and emit a stream of compressed data.
Implementations
Creates a new encoder which will read uncompressed data from the given stream and emit a compressed stream.
Creates a new encoder which will read uncompressed data from the given stream and emit a compressed stream.
Acquires a reference to the underlying reader that this encoder is wrapping.
Acquires a mutable reference to the underlying reader that this encoder is wrapping.
Note that care must be taken to avoid tampering with the state of the reader which may otherwise confuse this encoder.
Acquires a pinned mutable reference to the underlying reader that this encoder is wrapping.
Note that care must be taken to avoid tampering with the state of the reader which may otherwise confuse this encoder.
Consumes this encoder returning the underlying reader.
Note that this may discard internal state of this encoder, so care should be taken to avoid losing resources when this is called.
Trait Implementations
Auto Trait Implementations
impl<R> RefUnwindSafe for BzEncoder<R> where
R: RefUnwindSafe,
impl<R> UnwindSafe for BzEncoder<R> where
R: UnwindSafe,
Blanket Implementations
Creates a new AsyncRead
instance that chains this stream with
next
. Read more
Pulls some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Pulls some bytes from this source into the specified buffer, advancing the buffer’s internal cursor. Read more
Reads the exact number of bytes required to fill buf
. Read more
Reads an unsigned 8 bit integer from the underlying reader. Read more
Reads a signed 8 bit integer from the underlying reader. Read more
Reads an unsigned 16-bit integer in big-endian order from the underlying reader. Read more
Reads a signed 16-bit integer in big-endian order from the underlying reader. Read more
Reads an unsigned 32-bit integer in big-endian order from the underlying reader. Read more
Reads a signed 32-bit integer in big-endian order from the underlying reader. Read more
Reads an unsigned 64-bit integer in big-endian order from the underlying reader. Read more
Reads an signed 64-bit integer in big-endian order from the underlying reader. Read more
Reads an unsigned 128-bit integer in big-endian order from the underlying reader. Read more
Reads an signed 128-bit integer in big-endian order from the underlying reader. Read more
Reads an 32-bit floating point type in big-endian order from the underlying reader. Read more
Reads an 64-bit floating point type in big-endian order from the underlying reader. Read more
Reads an unsigned 16-bit integer in little-endian order from the underlying reader. Read more
Reads a signed 16-bit integer in little-endian order from the underlying reader. Read more
Reads an unsigned 32-bit integer in little-endian order from the underlying reader. Read more
Reads a signed 32-bit integer in little-endian order from the underlying reader. Read more
Reads an unsigned 64-bit integer in little-endian order from the underlying reader. Read more
Reads an signed 64-bit integer in little-endian order from the underlying reader. Read more
Reads an unsigned 128-bit integer in little-endian order from the underlying reader. Read more
Reads an signed 128-bit integer in little-endian order from the underlying reader. Read more
Reads an 32-bit floating point type in little-endian order from the underlying reader. Read more
Reads an 64-bit floating point type in little-endian order from the underlying reader. Read more
Reads all bytes until EOF in this source, placing them into buf
. Read more
fn read_to_string(&'a mut self, dst: &'a mut String) -> ReadToString<'a, Self> where
Self: Unpin,
fn read_to_string(&'a mut self, dst: &'a mut String) -> ReadToString<'a, Self> where
Self: Unpin,
Reads all bytes until EOF in this source, appending them to buf
. Read more
Mutably borrows from an owned value. Read more