コード例 #1
0
        public void WriteHuffmanCodeWithExtraBits(HuffmanTreeCode code, int codeIndex, int bits, int nBits)
        {
            int depth  = code.CodeLengths[codeIndex];
            int symbol = code.Codes[codeIndex];

            this.PutBits((uint)((bits << depth) | symbol), depth + nBits);
        }
コード例 #2
0
        public void WriteHuffmanCode(HuffmanTreeCode code, int codeIndex)
        {
            int depth  = code.CodeLengths[codeIndex];
            int symbol = code.Codes[codeIndex];

            this.PutBits((uint)symbol, depth);
        }