Patent attributes
A method for encoding an input sequence of symbols to produce a bitstream and a method of decoding the bitstream to generate a reconstructed binary sequence. Encoding employs an encoding tree having primary codewords associated with leaf nodes and secondary codewords associated with internal nodes. A flush event may cause output of secondary codewords. A context model is used to select an encoding tree corresponding to an estimated probability at the encoder. The same context model is used by the decoder to select a decoding tree. The decoder interleaves bits from decoded bit sequences associated with different estimated probabilities based on the context model.