fn align_to_byte<F>(
buffer: &mut [u8],
op: &mut F,
offset_in_bits: usize,
remaining_len_in_bits: usize,
)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 applybuffer- The mutable buffer to modifyoffset_in_bits- Starting bit offset (not byte-aligned)remaining_len_in_bits- Number of bits still to process starting atoffset_in_bits. When this is smaller than the number of bits left in the byte, the trailing bits of the byte are left untouched.