pub fn align_bitslice_start_u8(
    slice: &[u8],
    offset: usize,
    len: usize
) -> (u8, usize, &[u8], usize)
Expand description

Takes the given slice of bytes plus a bit offset and bit length and returns the slice so that it starts at a byte-aligned boundary.

Returns (in order):

  • the bits of the first byte if it isn’t a full byte
  • the number of bits in the first partial byte
  • the rest of the bits as a byteslice
  • the number of bits in the byteslice