Basic file version diff algorithm

廉价感情. 提交于 2019-12-04 12:15:41

问题


I'm looking for a solution to compare two versions of the same file to get a representation of the changes/differences.


回答1:


If it's plain text, then Google's diff-match-patch library ought to do what you want (it has a C# version).

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.




回答2:


For plain text files, you can find an open source implementation in c# here: https://github.com/mmanela/diffplex



来源:https://stackoverflow.com/questions/5550688/basic-file-version-diff-algorithm

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