Top Description Fields Constructors Methods
org.brotli.dec

pack-priv final Class HuffmanTreeGroup

extends Object
Class Inheritance

Contains a collection of huffman trees with the same alphabet size.

Field Summary

Modifier and TypeField and Description
private int
alphabetSize

The maximal alphabet size in this group.

pack-priv int[]
codes

Storage for Huffman lookup tables.

pack-priv int[]
trees

Offsets of distinct lookup tables in codes storage.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
decode(HuffmanTreeGroup
target POJO
group
,
BitReader
data source
br
)

Decodes Huffman trees from input stream and constructs lookup tables.

pack-priv static void
init(HuffmanTreeGroup
POJO to be initialised
group
,
int
the maximal alphabet size in this group
alphabetSize
,
int
number of Huffman codes
n
)

Initializes the Huffman tree group.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

alphabetSizeback to summary
private int alphabetSize

The maximal alphabet size in this group.

codesback to summary
pack-priv int[] codes

Storage for Huffman lookup tables.

treesback to summary
pack-priv int[] trees

Offsets of distinct lookup tables in codes storage.

Constructor Detail

HuffmanTreeGroupback to summary
pack-priv HuffmanTreeGroup()

Method Detail

decodeback to summary
pack-priv static void decode(HuffmanTreeGroup group, BitReader br)

Decodes Huffman trees from input stream and constructs lookup tables.

Parameters
group:HuffmanTreeGroup

target POJO

br:BitReader

data source

initback to summary
pack-priv static void init(HuffmanTreeGroup group, int alphabetSize, int n)

Initializes the Huffman tree group.

Parameters
group:HuffmanTreeGroup

POJO to be initialised

alphabetSize:int

the maximal alphabet size in this group

n:int

number of Huffman codes