Huffman code is used in the most streaming applications. I have written a Huffman decoder for jpeg pictures. For audio or other data streams the code have to adapt.
The state machine is controlled by the jpeg baseline markers.
Jpeg header is parsing for quantization and Huffman tables. It is re-programmable in each picture header. The implementation of dynamic Huffman table is very practical. If no information in the header is found the tables from the last picture are used again.
In the stream the stuffing bits are removed and recognized the codeword and after catch the mantissa bits.
This bits are used together with the quantization table to calculate the coefficients in the matrix.
High speed decoding for streaming application. After the End maker 0xFFD9 the decoder is restarted for decoding the next picture.
Simple 8Bit CPU input interface for small softcores.