An Algorithm for Differential File Comparison
Need to compare two files to find the differences? Here's a good discussion of the requirements, and a dynamic programming based algorithm. I'm planning to use this to create a C# based .net component for this job. I plan on open sourcing it, and using it as the basis of a file comparison and folder comparision utility, and perhaps as the basis of my own source code control system (which would rely on a top class auto+manual file merging facility).
The algorithm is available in a postscript format paper (.ps file) on the page linked to in the title of this entry. That page is the personal page for Professor M. Douglas McIlroy of Dartmouth college in New Hampshire I think, and contains many gems besides this one (much kudos to Professor McIlroy!). Scroll down to the Algorithms section, you'll see it titled "An algorithm for differential file comparison". Note that the picture "fig1.jpg" mentioned next to the paper is *essential*, make sure to download it too.
The algorithm is available in a postscript format paper (.ps file) on the page linked to in the title of this entry. That page is the personal page for Professor M. Douglas McIlroy of Dartmouth college in New Hampshire I think, and contains many gems besides this one (much kudos to Professor McIlroy!). Scroll down to the Algorithms section, you'll see it titled "An algorithm for differential file comparison". Note that the picture "fig1.jpg" mentioned next to the paper is *essential*, make sure to download it too.
0 Comments:
Post a Comment
<< Home