set_remainder_bits

Function set_remainder_bits 

Source
fn set_remainder_bits(
    start_remainder_mut_slice: &mut [u8],
    rem: u64,
    remainder_len: usize,
)
Expand description

Write remainder bits back to buffer while preserving bits outside the range.

This function carefully updates only the specified bits, leaving all other bits in the affected bytes unchanged.

ยงArguments

  • start_remainder_mut_slice - the slice of bytes to write the remainder bits to, the length must be equal to ceil(remainder_len, 8)
  • rem - The result bits to write
  • remainder_len - Number of bits to write