Skip to main content

remove

Function remove 

Source
pub fn remove(checksum: [u8; 2], bytes: &[u8]) -> [u8; 2]
Expand description

Updates a checksum to reflect that the already-checksummed bytes bytes have been removed.

remove implements the algorithm described in [RFC 1624 Eqn. 3] for the special case where the replacement data is all zeroes. The first byte must be at an even number offset in the original input. If an odd number offset byte needs to be removed, the caller should include a preceding zero byte. If an odd number of bytes in the middle of the input needs to be removed, a preceding or following zero byte should be added to make an even number of bytes.