pub fn set_range<'a>(data: &mut Vec<u8>, i: usize, input: &[u8])
Helper function to set a range of bytes in a vector.