fn write_bytes(dst: &mut Vec<u8>, val: impl AsRef<[u8]>)