Dictionary coder
Dictionary coders basically parse the stream of data to be encoded and build a table (dictionary) containing all the values that source messages assume. For example, if a dictionary coder is to encode the string "success", it's data dictionary will contain the entries: 's', 'u', 'c', and 'e'. Then the coder would assign a value (index) to each of these entries and encode the source stream with the values in the dictionary. In the previous example, assigning 1 to 's', 2 to 'u', 3 to 'c', and 4 to 'e' and encoding the string "success" gives a result similar to this: 1.2.3.3.4.1.1. Thus only the corresponding value (index) of a certain source message needs to be written out to the coded output. The value assigned to a message is normally smaller than the message itself to achieve data compression. Of course, the data dictionary itself needs to be written out to the output stream either at the beginning or at the end to enable reconstruction of the original data unless the data dictionary is preset (for example, the English alphabet).