biterator

Crates.iobiterator
lib.rsbiterator
version0.3.0
sourcesrc
created_at2022-01-17 19:15:23.760742
updated_at2022-01-21 14:35:16.364142
descriptionA crate for iterating over individual bits in a byte stream
homepage
repositoryhttps://github.com/thomascastleman/biterator.git
max_upload_size
id515732
size11,766
Thomas Castleman (thomascastleman)

documentation

README

biterator

Crates.io Documentation

This crate provides Biterator, an iterator over individual bits in a source of bytes.

Example

use biterator::{Biterator, Bit::*};

let bytes = [0b00001111, 0b10101011];
let b = Biterator::new(&bytes);

assert_eq!(
    b.collect::<Vec<_>>(),
    vec![
        Zero, Zero, Zero, Zero, One, One,  One, One,
        One,  Zero, One,  Zero, One, Zero, One, One,
    ]
);
Commit count: 11

cargo fmt