align_to_byte

Function align_to_byte 

Source
fn align_to_byte<F>(buffer: &mut [u8], op: &mut F, offset_in_bits: usize)
where F: FnMut(u64) -> u64,
Expand description

Align to byte boundary by applying operation to bits before the next byte boundary.

This function handles non-byte-aligned operations by processing bits from the current position up to the next byte boundary, while preserving all other bits in the byte.

ยงArguments

  • op - Unary operation to apply
  • buffer - The mutable buffer to modify
  • offset_in_bits - Starting bit offset (not byte-aligned)