Closed JeWe37 closed 1 year ago
HDiffPatch does not support partial patch
now;
You may need to modify and implement it yourself;
From your requirements description, it's like in-place update
? refer discussion #36 .
Assuming the translation is correct that seems so
I have done a bit of experimenting with this myself and getting a sketch implemented for the old APIs(patch(...)
) was relatively easy, but I can't say I understand the code of the new APIs well enough to do the same for those. The algorithm I came up with was essentially the same as is outlined in that issue, basically just have a sorted list for the covers and run length encoding sequences, then whenever a specific segment is read do a binary search for each and apply the values till the end of the range.
I'll close this as a duplicate.
I would like to be able to read only a specific section (offset, length) of a patched file, but with the current APIs I need to patch the entire file to do that, which introduces a lot of latency and/or requires a lot of space-inefficient caching.