FM-Index (Code imported from http://pizzachili.di.unipi.it/indexes/FM-indexV2)