3.1.1.1.3.8 PrefixCodeTreeDecodeSymbol
Returns the symbol encoded by the next prefix code in a bit string.
Parameters
inout BITSTRING bstr: A bit string.
in PREFIX_CODE_NODE root: The root node of a Huffman prefix code tree.
Return Value
Returns a ULONG containing the value of the next symbol that was encoded in the bit string.
Algorithm
-
ULONG bit PREFIX_CODE_NODE node := root do bit := BitstringLookup(bstr, 1) BitstringSkip(bstr, 1) node := node.child[bit] while node.leaf = FALSE return node.symbol