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.