1. A computer implemented method of compressing data, comprising: receiving an input stream of characters; parsing the input stream into a plurality of strings each of which include one or more of the characters, wherein each parsed string is a longest match to a string entry in a data structure; and transforming the input stream into an output stream that includes a first portion having literal values of the characters and a separate and distinct second portion having index values corresponding to string entries in the data structure that match parsed strings from the input stream.