1. A computer implemented method of compressing data, comprising: receiving an input stream of characters; adding a new string entry to a data structure based on a current portion of the input stream if the current portion fails to match any of a plurality of existing string entries in the data structure; adding an additional string entry to the data structure based on a combination of the current portion and a previous portion of the input stream, wherein the additional string entry corresponds to a subset of the combination that fails to match any of the plurality of existing string entries in the data structure; and transforming the input stream into an output stream that includes literal values of the characters and index values corresponding to string entries in the data structure that match portions of the input stream.