i am trying to write BWT with Huffman compression program with Java. In BWT i want to implement Distance Coding (DC). I am looking for some examples, but there isn't so much of them.
I found this example:
http://www.cs.ucr.edu/~stelo/cpm/cpm07/move_to_front_gagie.pdf
DC is starting with 29 page. But it really hard to understand because there is no comments.
Maybe someone had implemented DC or know theory how to implement it in real code ? :)
I understood that part that first off all need to write what char was. But then with distance i didn't get it.
I red that for each character , DC finds its next occurrence in the sequence and write it to S and outputs the distance to it. If there is no occurrence then write 0.
Thanks.