ddelta
ddelta copied to clipboard
Support for `incremental` patching
Thanks for your work on this project, it looks like a very promising delta algorithm for embedded/memory constrained devices.
Is 'incremental' patching possible with this algorithm? For example, can we do something like below every time new data arrives into the patch stream? It'll need to maintain any state in between calls of course.
ddelta_apply_incremental(patch_stream, old_stream, new_stream)
ddelta_apply_incremental(patch_stream, old_stream, new_stream)
ddelta_apply_incremental(patch_stream, old_stream, new_stream)
.
.
.
ddelta_apply_incremental(patch_stream, old_stream, new_stream) // Patch stream data complete
I hope that makes sense, I am happy to elaborate.
That's not possible, the old file is not a stream of data, the algorithm requires going backwards in there. For generation, you even need to be able to seek backwards in the "new" file.
With pu/windowed, it could be possible, as you only need to seek backwards in your current window. But then you'll likely need an additional copy slowing things down for the common case it's targetting.
Sorry I actually meant if the patch is a stream, but the old and new files are still seekable.
So in effect -
ddelta_apply_incremental(patch_stream, old, new)
ddelta_apply_incremental(patch_stream, old, new)
ddelta_apply_incremental(patch_stream, old, new)
.
.
.
ddelta_apply_incremental(patch_stream, old, new) // Patch stream data complete
Would that be possible at all?
Hi again, we've actually implemented a prototype of incremental patching. Would you be open to a pull request?