nom-bitvec

LICENSE Join the chat at https://gitter.im/Geal/nom Crates.io Version Minimum rustc version

This crate provides input types for nom parser combinators using bitvec. With those, you can use common nom combinators directly on streams of bits.

Example

```rust let data = [0xA5u8, 0x69, 0xF0, 0xC3]; let bits = data.view_bits::();

fn parser(bits: &BitSlice) -> IResult<&BitSlice, &BitSlice> { tag(bits![1, 0, 1, 0])(bits) }

assert_eq!(parser(bits), Ok((&bits[..4], &bits[4..]))); ```