Class HuffmanTreeGroup
java.lang.Object
com.itextpdf.io.codec.brotli.dec.HuffmanTreeGroup
Contains a collection of huffman trees with the same alphabet size.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThe maximal alphabet size in this group.(package private) int[]Storage for Huffman lookup tables.(package private) int[]Offsets of distinct lookup tables incodesstorage. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voiddecode(HuffmanTreeGroup group, BitReader br) Decodes Huffman trees from input stream and constructs lookup tables.(package private) static voidinit(HuffmanTreeGroup group, int alphabetSize, int n) Initializes the Huffman tree group.
-
Field Details
-
alphabetSize
private int alphabetSizeThe maximal alphabet size in this group. -
codes
int[] codesStorage for Huffman lookup tables. -
trees
int[] treesOffsets of distinct lookup tables incodesstorage.
-
-
Constructor Details
-
HuffmanTreeGroup
HuffmanTreeGroup()
-
-
Method Details
-
init
Initializes the Huffman tree group.- Parameters:
group- POJO to be initialisedalphabetSize- the maximal alphabet size in this groupn- number of Huffman codes
-
decode
Decodes Huffman trees from input stream and constructs lookup tables.- Parameters:
group- target POJObr- data source
-