Hi Euncheon,
I have just made the following changes to NVBIO which might be generally useful:
* generalized rank_dictionary to support larger alphabets; note that while it is now possible to use this class with alphabets \Sigma with s=16 and
256 symbols (i.e. log(s) = 4 or 8) storage is _linear_ in the alphabet size (and so exponential in the number of bits per symbol s).
So for large strings and large alphabets, this is likely unusable
* introduced a new WaveletTree class, which allows to perform rank queries in O(log(s)) time and with O(log(s)) storage.
The idea is that this class could be used as an interchangeable replacement for rank_dictionary.
I have not (yet) tested the combination of the fm_index class with any of the new dictionaries, but I think it should work... modulo minor changes.
I will have a look in the next days.
As to the exact names of codes you should read, well - basically, the code for nvBWT, and then the fm_index, rank_dictionary,
and WaveletTree classe.