Decodes Huffman table from bit-stream. @return number of slots used by resulting Huffman table
(int alphabetSizeMax, int alphabetSizeLimit,
int[] tableGroup, int tableIdx, State s)
| 648 | * @return number of slots used by resulting Huffman table |
| 649 | */ |
| 650 | private static int readHuffmanCode(int alphabetSizeMax, int alphabetSizeLimit, |
| 651 | int[] tableGroup, int tableIdx, State s) { |
| 652 | if (s.halfOffset > BitReader.HALF_WATERLINE) { |
| 653 | final int result = BitReader.readMoreInput(s); |
| 654 | if (result < BROTLI_OK) { |
| 655 | return result; |
| 656 | } |
| 657 | } |
| 658 | BitReader.fillBitWindow(s); |
| 659 | final int simpleCodeOrSkip = BitReader.readFewBits(s, 2); |
| 660 | if (simpleCodeOrSkip == 1) { |
| 661 | return readSimpleHuffmanCode(alphabetSizeMax, alphabetSizeLimit, tableGroup, tableIdx, s); |
| 662 | } |
| 663 | return readComplexHuffmanCode(alphabetSizeLimit, simpleCodeOrSkip, tableGroup, tableIdx, s); |
| 664 | } |
| 665 | |
| 666 | private static int decodeContextMap(int contextMapSize, byte[] contextMap, State s) { |
| 667 | int result; |
no test coverage detected