pub fn apply_patch<P: Read + Seek, R: Read + Seek, W: Write + Read + Seek>(
patch: &mut P,
src: Option<&mut R>,
sink: &mut W,
) -> Result<()>
Expand description
Applies an SMDiff patch to a source buffer
§Arguments
patch
- A Read object that contains the SMDiff patch datasrc
- An optional mutable reference to a Read+Seek object that contains the source (dictionary) datasink
- A Write object that will receive the patched data
§Errors
Returns an error if there is an issue reading from the patch or source data, or writing to the sink
Note: To enable patch application to large files, we require Read+Seek on the Sink to handle CopySrc::Output operations