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 Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
    The maximal alphabet size in this group.
    (package private) int[]
    Storage for Huffman lookup tables.
    (package private) int[]
    Offsets of distinct lookup tables in codes storage.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static void
    Decodes Huffman trees from input stream and constructs lookup tables.
    (package private) static void
    init(HuffmanTreeGroup group, int alphabetSize, int n)
    Initializes the Huffman tree group.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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