Instances of this class are used as the nodes of binary trees representing
mappings of tags to compression stream elements. Tags are descriptors
inserted into the compression command stream that specify the encoding of
immediately succeeding data elements.
The tag assignments in such a tree are computed from the paths taken from
the root to the leaf nodes. Each leaf node represents the particular way
one or more compression stream elements wound up being encoded with respect
to various combinations of data lengths, shifts, and absolute/relative
status.
Huffman's algorithm for constructing binary trees with minimal weighted
path lengths can be used to optimize the bit lengths of the tags with
respect to the frequency of occurrence of their associated data encodings
in the compression stream. The weighted path length is the sum of the
frequencies of all the leaf nodes times their path lengths to the root of
the tree.
The length of the longest tag determines the size of the table mapping tags
to data representations. The geometry compression specification limits the
size of the table to 64 entries, so tags cannot be longer than 6 bits. The
depth of the tree is reduced through a process of increasing the data
lengths of less frequently occuring nodes so they can be merged with other
more frequent nodes.
|