Crate biterate

Source
Expand description

A simple crate for iterating over the bits in bytes.

The crate provides 2 functionalities, exposed as traits:

  • Iterating over the 1-bits in unsigned integer types and sequences thereof – see Biterate
  • The reverse: Constructing integers from indicies of the 1-bits – see CompressIndices

Structs§

BitIndices
An iterator over the bits in a word (such as u8, u16 etc).
BitIndicesSeq
An iterator of bit-indices from a multi-word sequence.

Traits§

BitBlock
A trait abstracting over types which can be used as a block of bits.
Biterate
The main trait for iterating over the one bits in an integer or sequence of integers.
BiterateAdaptor
Adaptor trait for working with generic iterators.
CompressIndices
Converts an iterator of bit-indices to a compressed bit-set form.