pub struct BzDecoder<R> { /* private fields */ }
Available on crate features tokio-02 and bzip2 only.
Expand description

A bzip2 decoder, or decompressor.

This structure implements an AsyncRead interface and will read compressed data from an underlying stream and emit a stream of uncompressed data.

Implementations

Creates a new decoder which will read compressed data from the given stream and emit a uncompressed stream.

Configure multi-member/frame decoding, if enabled this will reset the decoder state when reaching the end of a compressed member/frame and expect either EOF or another compressed member/frame to follow it in the stream.

Acquires a reference to the underlying reader that this decoder is wrapping.

Acquires a mutable reference to the underlying reader that this decoder is wrapping.

Note that care must be taken to avoid tampering with the state of the reader which may otherwise confuse this decoder.

Acquires a pinned mutable reference to the underlying reader that this decoder is wrapping.

Note that care must be taken to avoid tampering with the state of the reader which may otherwise confuse this decoder.

Consumes this decoder returning the underlying reader.

Note that this may discard internal state of this decoder, so care should be taken to avoid losing resources when this is called.

Trait Implementations

Attempts to read from the AsyncRead into buf. Read more
Prepares an uninitialized buffer to be safe to pass to read. Returns true if the supplied buffer was zeroed out. Read more
Pulls some bytes from this source into the specified BufMut, returning how many bytes were read. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
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 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 all bytes until EOF in this source, placing them into buf. Read more
Reads all bytes until EOF in this source, appending them to buf. Read more
Creates an adaptor which reads at most limit bytes from it. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.