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); }
public void WriteHuffmanCode(HuffmanTreeCode code, int codeIndex) { int depth = code.CodeLengths[codeIndex]; int symbol = code.Codes[codeIndex]; this.PutBits((uint)symbol, depth); }