Creating Delta Diff Patches of large Binary Files in C#

偶尔善良 提交于 2019-12-31 22:42:13

问题


I looking for a way to create Delta Diff Patches of Large Binary Files (VMWare Virtual Disk Files). Is there an implementation in C# or any useful methods in the the .NET Framework.

Any help is appreciated. Thanks.

rAyt


回答1:


There's nothing built into the framework to do this.

You're going to have to look for 3rd party solutions, commercial or free, or write your own.

A common algorithm is the VCDiff algorithm, which is used by quite a large number of products.




回答2:


bsdiff was designed to create very small patches for binary files.

As stated on its page, it requires max(17*n,9*n+m)+O(1) bytes of memory and runs in O((n+m) log n) time (where n is the size of the old file and m is the size of the new file), so it will take a long time and use a huge amount of memory to create diffs for virtual disk files.

The original implementation is in C, but a C# port is described here and available here.




回答3:


Here's a C# class that implements Meyers O(ND) Difference Algorithm:

http://www.mathertel.de/Diff/default.aspx

Enjoy!



来源:https://stackoverflow.com/questions/892310/creating-delta-diff-patches-of-large-binary-files-in-c-sharp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!