Cool Algorithm - Fast text search using BWT
blog.avadis-ngs.com
blog.avadis-ngs.com
CPD now uses Rabin-Karp searching, which is faster still. However, writing a copy-paste detector with BWT is fairly trivial and I still keep that script in my head for languages CPD can't handle.
http://www.alexbowe.com/tag/datastructures
He describes how you can store the FM-index in less space than the original text.