1.3 Overview

This algorithm enables an implementer to compress or decompress RTF-encoded text. During compression, the RTF-encoded text is compared to a dictionary of RTF control words, as described in [MSFT-RTF]. If any of the input text matches the control words in the dictionary, a dictionary reference, as described in section 2.1.3.1.5, is written to the output buffer in place of the control word to reduce the bytes sent over the wire. Any content that does not have a dictionary match is simply written to the output buffer.

Conversely, during decompression, the compressed RTF-encoded text is compared against the dictionary and dictionary references are replaced with RTF control words. This algorithm defines the manner in which the RTF-encoded text is compared to the dictionary content and how the RTF-encoded text is read from the input buffer or written to the output buffer.

Show: