java.lang.Object
org.apache.commons.compress.compressors.deflate64.HuffmanDecoder
All Implemented Interfaces:
Closeable, AutoCloseable

class HuffmanDecoder extends Object implements Closeable
  • Field Details

    • RUN_LENGTH_TABLE

      private static final short[] RUN_LENGTH_TABLE
       --------------------------------------------------------------------
       idx  xtra  base     idx  xtra  base     idx  xtra  base
       --------------------------------------------------------------------
       257   0     3       267   1   15,16     277   4   67-82
       258   0     4       268   1   17,18     278   4   83-98
       259   0     5       269   2   19-22     279   4   99-114
       260   0     6       270   2   23-26     280   4   115-130
       261   0     7       271   2   27-30     281   5   131-162
       262   0     8       272   2   31-34     282   5   163-194
       263   0     9       273   3   35-42     283   5   195-226
       264   0     10      274   3   43-50     284   5   227-257
       265   1     11,12   275   3   51-58     285   16  3
       266   1     13,14   276   3   59-66
       --------------------------------------------------------------------
       
      value = (base of run length) << 5 | (number of extra bits to read)
    • DISTANCE_TABLE

      private static final int[] DISTANCE_TABLE
       --------------------------------------------------------------------
       idx  xtra  dist     idx  xtra  dist       idx  xtra  dist
       --------------------------------------------------------------------
       0    0     1        10   4     33-48      20    9   1025-1536
       1    0     2        11   4     49-64      21    9   1537-2048
       2    0     3        12   5     65-96      22   10   2049-3072
       3    0     4        13   5     97-128     23   10   3073-4096
       4    1     5,6      14   6     129-192    24   11   4097-6144
       5    1     7,8      15   6     193-256    25   11   6145-8192
       6    2     9-12     16   7     257-384    26   12   8193-12288
       7    2     13-16    17   7     385-512    27   12   12289-16384
       8    3     17-24    18   8     513-768    28   13   16385-24576
       9    3     25-32    19   8     769-1024   29   13   24577-32768
       30   14   32769-49152
       31   14   49153-65536
       --------------------------------------------------------------------
       
      value = (base of distance) << 4 | (number of extra bits to read)
    • CODE_LENGTHS_ORDER

      private static final int[] CODE_LENGTHS_ORDER
      When using dynamic huffman codes the order in which the values are stored follows the positioning below
    • FIXED_LITERALS

      private static final int[] FIXED_LITERALS
      Huffman Fixed Literal / Distance tables for mode 1
    • FIXED_DISTANCE

      private static final int[] FIXED_DISTANCE
    • finalBlock

      private boolean finalBlock
    • state

    • reader

      private BitInputStream reader
    • in

      private final InputStream in
    • memory

      private final HuffmanDecoder.DecodingMemory memory
  • Constructor Details

  • Method Details