apply_patch

Function apply_patch 

Source
pub fn apply_patch<T, W>(old: &[u8], patch: &mut T, new: &mut W) -> Result<()>
where T: Read, W: Write + DerefMut<Target = [u8]>,
Expand description

Apply a patch to an “old” file, returning the “new” file.

old is the old file, patch will be read from with the patch, new is the buffer that will be written into.

This is optimized for performance with:

  • Bulk read operations
  • SIMD-friendly memory access patterns
  • Proper validation with early errors