Finding matching regions in file..
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
I'm looking for a way to find matching regions in a file - much like the LCS (diff) algorithm, but optimized for moved data. For example in the two strings below: "milk and coffee" "coffee and milk" LCS will only find a small matching region, " and ", while the strings themself have larger matching regions. Currently I'm using a "sliding windows" approach (similar to rsync) to do this, but it gets a bit slow for large files. Any suggestions or references would be welcome - I'm looking for both heuristics and algorithms. Im also looking for traditional diff heuristics... /Thanks moliate
The corners of my eyes catch hasty, bloodless motion - a mouse? Well, certainly a peripheral of some kind.
Neil Gaiman - Cold Colours