Ruby implementation of the Sequitur algorithm