pub fn append_slice(buf: &mut Vec<u8>, data: &[u8])