Struct bitstream_io::BitQueue [] [src]

pub struct BitQueue<E: Endianness, N: Numeric> { /* fields omitted */ }

A queue for efficiently pushing bits onto a value and popping them off a value.

Methods

impl<E: Endianness, N: Numeric> BitQueue<E, N>
[src]

Returns a new empty queue

Creates a new queue from the given value with the given size

Sets the queue to a given value with the given number of bits

Consumes the queue and returns its current value

Returns the total bits in the queue

Returns the maximum bits the queue can hold

Returns true if the queue is empty

Returns true if the queue is full

Drops all values in the queue

Returns true if all bits remaining in the queue are 0

Returns true if all bits remaining in the queue are 1

Pushes a value with the given number of bits onto the tail of the queue

Pops a value with the given number of bits from the head of the queue

Drops the given number of bits from the head of the queue without returning them.

Pops all 0 bits up to and including the next 1 bit and returns the amount of 0 bits popped

Pops all 1 bits up to and including the next 0 bit and returns the amount of 1 bits popped

impl<E: Endianness> BitQueue<E, u8>
[src]