Package com.itextpdf.io.codec.brotli.dec
Class HuffmanTreeGroup
- java.lang.Object
-
- com.itextpdf.io.codec.brotli.dec.HuffmanTreeGroup
-
final class HuffmanTreeGroup extends java.lang.ObjectContains a collection of huffman trees with the same alphabet size.
-
-
Field Summary
Fields Modifier and Type Field Description private intalphabetSizeThe maximal alphabet size in this group.(package private) int[]codesStorage for Huffman lookup tables.(package private) int[]treesOffsets of distinct lookup tables incodesstorage.
-
Constructor Summary
Constructors Constructor Description HuffmanTreeGroup()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (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 Detail
-
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 incodesstorage.
-
-
Method Detail
-
init
static void init(HuffmanTreeGroup group, int alphabetSize, int n)
Initializes the Huffman tree group.- Parameters:
group- POJO to be initialisedalphabetSize- the maximal alphabet size in this groupn- 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 POJObr- data source
-
-