Class HuffmanTreeGroup

java.lang.Object
com.itextpdf.io.codec.brotli.dec.HuffmanTreeGroup

final class HuffmanTreeGroup extends Object
Contains a collection of huffman trees with the same alphabet size.
  • Field Details

    • alphabetSize

      private int alphabetSize
      The maximal alphabet size in this group.
    • codes

      int[] codes
      Storage for Huffman lookup tables.
    • trees

      int[] trees
      Offsets of distinct lookup tables in codes storage.
  • Constructor Details

    • HuffmanTreeGroup

      HuffmanTreeGroup()
  • Method Details

    • init

      static void init(HuffmanTreeGroup group, int alphabetSize, int n)
      Initializes the Huffman tree group.
      Parameters:
      group - POJO to be initialised
      alphabetSize - the maximal alphabet size in this group
      n - number of Huffman codes
    • decode

      static void decode(HuffmanTreeGroup group, BitReader br)
      Decodes Huffman trees from input stream and constructs lookup tables.
      Parameters:
      group - target POJO
      br - data source