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