1. A method comprising compressing data for communication in a terminal services environment by: finding an index in a lookup table that matches an initial sequence in data, wherein: the lookup table includes a plurality of entries, each said entry being discoverable utilizing a particular one of a plurality of said indices; and each said entry references whether a corresponding said index is located in a history buffer, and if so, further references one or more locations of the corresponding said index in the history buffer; and if the corresponding said entry of the matching index references a plurality of said locations: for each said location, comparing a sequence at the location having the matching index with a sequence in the data, said sequence including the initial sequence; deriving a matching sequence from the comparison based on at least one of a length and the location of the sequence at each said location; and representing the matching sequence using a representation that includes the length and the location of the matching sequence in the history buffer.