1. diffplex-A. Net diff Generator
Http://diffplex.codeplex.com/
Introduction:
Specific use can see http://diffplex.codeplex.com/wikipage? Title = Library & referringtitle = home
Idiffer is the core class of difference comparison, providing a rough comparison of the two texts with low accuracy
Isidebysidediff: provides high-precision comparison and can be used to compare and display the differences in two columns
Interface
Silverlight
Website
2. diffengine
Introduction:
Powerful functions,
Disadvantage: each line of text cannot exceed 1024 characters
Differenceengine. difflist_textfile sourcefile NULL;
Differenceengine. difflist_textfile destinationfile = NULL;
Sourcefile = new differenceengine. difflist_textfile ("1.txt ");
Destinationfile = new differenceengine. difflist_textfile ("2.txt ");
Differenceengine. diffengine engine = new differenceengine. diffengine ();
Engine. processdiff (sourcefile, destinationfile, differenceengine. diffenginelevel. fastimperfect );
Arraylist difflines = engine. diffreport ();
Foreach (differenceengine. diffresultspan span in difflines)
{
Switch (span. Status)
{
Case ifferenceengine. diffresultspanstatus. nochange:
// Not changed
Break;
Case differenceengine. diffresultspanstatus. adddestination:
// Newly added
Break;
Case differenceengine. diffresultspanstatus. deletesource:
// Deleted
Break;
Case differenceengine. diffresultspanstatus. replace:
// Modified
Break;
Default:
// Default
Break;
}
}
Example of getting new content:
String STR = (differenceengine. textline) (destinationfile. getbyindex (span. destindex). line;
Http://www.codeproject.com/KB/recipes/diffengine.aspx
3. htmldiff
Introduction:
Htmldiff was originally a ruby version of the HTML difference comparison algorithm. Later, a friend made a C # version, which is very easy to use and too simple.
C # edition: http://htmldiff.codeplex.com/
RUBY: http://github.com/myobie/htmldiff
Http://www.rohland.co.za/index.php/2009/10/31/csharp-html-diff-algorithm/
4. ndiffdiff: a diff implementation for lines and chars in Text File
Introduction:
Provide winform demo
Http://www.codeproject.com/KB/recipes/NBDiffDiff.aspx