Jump to content

Dictionary coder

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 212.33.99.67 (talk) at 10:28, 12 August 2004 (Added basic definition of Dictionary Coders.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

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).