pub struct Bitstream<R: ReadBytes> { /* private fields */ }
Expand description

Wraps a Reader to facilitate reading that is not byte-aligned.

Implementations

Wraps the reader with a reader that facilitates reading individual bits.

Reads a single bit.

Reading a single bit can be done more efficiently than reading more than one bit, because a bit never straddles a byte boundary.

Reads bits until a 1 is read, and returns the number of zeros read.

Because the reader buffers a byte internally, reading unary can be done more efficiently than by just reading bit by bit.

Reads at most eight bits.

Read n bits, where 8 < n <= 16.

Reads at most 16 bits.

Reads at most 32 bits.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. 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.