final class Bzip2HuffmanStageDecoder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) int |
alphabetSize
The total number of codes (uniform for each table).
|
private int[][] |
codeBases
An array of values for each Huffman table that must be subtracted from the numerical value of
a Huffman code of a given bit length to give its canonical code index.
|
private int[][] |
codeLimits
An array of values for each Huffman table that gives the highest numerical value of a Huffman
code of a given bit length.
|
private int[][] |
codeSymbols
A mapping for each Huffman table from canonical code index to output symbol.
|
(package private) int |
currentAlpha |
(package private) int |
currentGroup |
(package private) int |
currentLength |
(package private) int |
currentSelector |
private int |
currentTable
The Huffman table for the current group.
|
private int |
groupIndex
The index of the current group within the selectors array.
|
private int |
groupPosition
The byte position within the current group.
|
private int[] |
minimumLengths
The minimum code length for each Huffman table.
|
(package private) boolean |
modifyLength |
private Bzip2BitReader |
reader
A reader that provides bit-level reads.
|
(package private) byte[] |
selectors
The Huffman table number to use for each group of 50 symbols.
|
(package private) byte[][] |
tableCodeLengths
The Canonical Huffman code lengths for each table.
|
(package private) Bzip2MoveToFrontTable |
tableMTF
Table for Move To Front transformations.
|
(package private) int |
totalTables
Total number of used Huffman tables in range 2..6.
|
Constructor and Description |
---|
Bzip2HuffmanStageDecoder(Bzip2BitReader reader,
int totalTables,
int alphabetSize) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
createHuffmanDecodingTables()
Constructs Huffman decoding tables from lists of Canonical Huffman code lengths.
|
(package private) int |
nextSymbol()
Decodes and returns the next symbol.
|
private final Bzip2BitReader reader
byte[] selectors
private final int[] minimumLengths
private final int[][] codeBases
private final int[][] codeLimits
private final int[][] codeSymbols
private int currentTable
private int groupIndex
private int groupPosition
final int totalTables
final int alphabetSize
final Bzip2MoveToFrontTable tableMTF
int currentSelector
final byte[][] tableCodeLengths
int currentGroup
int currentLength
int currentAlpha
boolean modifyLength
Bzip2HuffmanStageDecoder(Bzip2BitReader reader, int totalTables, int alphabetSize)