pub fn generate_chunked(
old_f: &mut impl Read,
new_f: &mut impl Read,
patch_f: &mut impl Write,
chunk_sizes: impl Into<Option<usize>>,
progress: impl FnMut(State),
) -> Result<()>Expand description
Generate a ddelta patch. This does not have a limit of 2^31-1 bytes, unlike generate.
However, the output is not compatible with the original ddelta tool or bsdiff. Attempting to use
the original program or apply with the output created by this function will
create an unspecified output, that is only valid up to chunk_sizes or 2^31-1 bytes, whichever
is smaller. apply_chunked must be used to use the patch file.
progress is a function that will be called periodically with progress updates. The algorithm
will never consume more than chunk_sizes * 6, so this parameter can be used to implement a RAM
limit. Pass None as a parameter to set no limit. Note that this uses anything implementing
Into<Option<usize>>, including a usize itself, so you can just pass a number to that
parameter. A smaller chunk_sizes value uses less RAM, but creates less optimal patches.