The dictionary in compress method was running in O(n^2) time due to call to Array#index. Redesigning the dictionary as a hash sped up the compression from 4 seconds for the_last_question.txt to 0.03 seconds.
Merge pull request #6 from vikram7/vr-speed-up-algorithm

The dictionary in compress method was running in O(n^2) time due to call...