基本的文件版本差异算法 [英] Basic file version diff algorithm
本文介绍了基本的文件版本差异算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找一个解决方案来比较同一文件的两个版本来获得的更改/差异的表现。
I'm looking for a solution to compare two versions of the same file to get a representation of the changes/differences.
推荐答案
如果是纯文本,那么谷歌的差异匹配补丁图书馆应该做的你想要什么(它有一个C#版本)。
If it's plain text, then Google's diff-match-patch library ought to do what you want (it has a C# version).
如果它的二进制数据,再看看人们做将更新应用到可执行的东西(的 bsdiff 和胡瓜一>)。他们寻找两个文件之间的差异最小,这样一个较小的更新可被发送给最终用户。听起来类似您的需求。
If it's binary data, then look into the things people do to apply updates to executables (bsdiff and Courgette). They look for the minimum difference between two files so that a smaller update can be sent out to end users. Sounds similar to your needs.
这篇关于基本的文件版本差异算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文