Lines Matching defs:bits
12 /// Converts a byte-level input to a bit-level input, for consumption by a parser that uses bits.
14 /// Afterwards, the input is converted back to a byte-level parser, with any remaining bits thrown
19 /// use nom::bits::{bits, streaming::take};
25 /// bits::<_, _, Error<(&[u8], usize)>, _, _>(tuple((take(4usize), take(8usize))))(input)
40 pub fn bits<I, O, E1, E2, P>(mut parser: P) -> impl FnMut(I) -> IResult<I, O, E2>
61 /// Counterpart to `bits`, `bytes` transforms its bit stream input into a byte slice for the underlying
68 /// use nom::bits::{bits, bytes, streaming::take};
75 /// bits::<_, _, Error<(&[u8], usize)>, _, _>(tuple((
116 use crate::bits::streaming::take;
121 /// Take the `bits` function and assert that remaining bytes are correctly returned, if the
128 bits::<_, _, Error<(&[u8], usize)>, _, _>(tuple((take(4usize), take(8usize), take(4usize))))(
144 /// Take the `bits` function and assert that remaining bytes are correctly returned, if the
146 /// I.e. if we consume 1.5 bytes of 4 bytes, 2 bytes will be returned, bits 13-16 will be
153 bits::<_, _, Error<(&[u8], usize)>, _, _>(tuple((take(4usize), take(8usize))))(input);
173 bits::<_, _, Error<(&[u8], usize)>, _, _>(tuple((take(4usize), take(8usize))))(input);