1. In a system for decoding variable length codes in a bit stream, a method comprising: creating a set of data structures; selecting an active data structure; retrieving a bit set size associated with the active data structure; reading a number of bits equal to the bit set size from the bit stream; and obtaining, from the active data structure, in accordance with an actual value of the bits read from the bit stream, a decoded value, actual code length, reference to another data structure, and validity indicator associated with a variable length code.