/// <summary>Decodes Huffman trees from input stream and constructs lookup tables.</summary>
        /// <param name="group">target POJO</param>
        /// <param name="br">data source</param>
        internal static void Decode(Brotli.HuffmanTreeGroup group, Brotli.BitReader br)
        {
            int next = 0;
            int n    = group.trees.Length;

            for (int i = 0; i < n; i++)
            {
                group.trees[i] = next;
                Brotli.Decode.ReadHuffmanCode(group.alphabetSize, group.codes, next, br);
                next += Brotli.Huffman.HuffmanMaxTableSize;
            }
        }
 /// <summary>Initializes the Huffman tree group.</summary>
 /// <param name="group">POJO to be initialised</param>
 /// <param name="alphabetSize">the maximal alphabet size in this group</param>
 /// <param name="n">number of Huffman codes</param>
 internal static void Init(Brotli.HuffmanTreeGroup group, int alphabetSize, int n)
 {
     group.alphabetSize = alphabetSize;
     group.codes        = new int[n * Brotli.Huffman.HuffmanMaxTableSize];
     group.trees        = new int[n];
 }