1. A method of compressing data transmitted to a terminal device, said terminal device being of the type having a characteristic predetermined plurality of commands and a command syntax defining a character string comprising one of said plurality of commands together with a data string as a command string, comprising the steps of: (a) receiving a first set of command strings from an application; (b) sorting said first set of command strings by buffer address locations contained in said set of command strings to provide a command string representation of the contents of a buffer at said terminal device; (c) transmitting said command string representation to said terminal device; (d) receiving a second set of command strings from said application; (e) sorting said second set of command strings by buffer address locations to provide a sorted second set of command strings; (f) sequentially analyzing and merging said sorted, second set of command strings and said command string representation to provide an expected state command string representation and a write command string representing data differences between said command string representation and said sorted second set of command strings; (g) storing said expected state command string representation as a replacement of said command string representation and transmitting said write command string to said terminal device; and (h) repeating steps (d) through (g) for subsequent sets of command strings received from said application.