Bzip2HuffmanStageDecoder Class — netty Architecture
Architecture documentation for the Bzip2HuffmanStageDecoder class in Bzip2HuffmanStageDecoder.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 14c72e79_23d2_4aa5_16ea_6018c1df750a["Bzip2HuffmanStageDecoder"] ad6239b9_d68a_f390_6c38_d3f10635c7ae["Bzip2HuffmanStageDecoder.java"] 14c72e79_23d2_4aa5_16ea_6018c1df750a -->|defined in| ad6239b9_d68a_f390_6c38_d3f10635c7ae 20955d84_167f_5753_9682_2be96f9ba33b["Bzip2HuffmanStageDecoder()"] 14c72e79_23d2_4aa5_16ea_6018c1df750a -->|method| 20955d84_167f_5753_9682_2be96f9ba33b 1f145f57_0ee1_c514_d995_5c5721dc2790["createHuffmanDecodingTables()"] 14c72e79_23d2_4aa5_16ea_6018c1df750a -->|method| 1f145f57_0ee1_c514_d995_5c5721dc2790 e40f42bb_dad0_229d_34dc_ece94099165b["nextSymbol()"] 14c72e79_23d2_4aa5_16ea_6018c1df750a -->|method| e40f42bb_dad0_229d_34dc_ece94099165b
Relationship Graph
Source Code
codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2HuffmanStageDecoder.java lines 25–203
final class Bzip2HuffmanStageDecoder {
/**
* A reader that provides bit-level reads.
*/
private final Bzip2BitReader reader;
/**
* The Huffman table number to use for each group of 50 symbols.
*/
byte[] selectors;
/**
* The minimum code length for each Huffman table.
*/
private final int[] minimumLengths;
/**
* 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 final int[][] codeBases;
/**
* An array of values for each Huffman table that gives the highest numerical value of a Huffman
* code of a given bit length.
*/
private final int[][] codeLimits;
/**
* A mapping for each Huffman table from canonical code index to output symbol.
*/
private final int[][] codeSymbols;
/**
* The Huffman table for the current group.
*/
private int currentTable;
/**
* The index of the current group within the selectors array.
*/
private int groupIndex = -1;
/**
* The byte position within the current group. A new group is selected every 50 decoded bytes.
*/
private int groupPosition = -1;
/**
* Total number of used Huffman tables in range 2..6.
*/
final int totalTables;
/**
* The total number of codes (uniform for each table).
*/
final int alphabetSize;
/**
* Table for Move To Front transformations.
*/
final Bzip2MoveToFrontTable tableMTF = new Bzip2MoveToFrontTable();
// For saving state if end of current ByteBuf was reached
int currentSelector;
/**
* The Canonical Huffman code lengths for each table.
*/
final byte[][] tableCodeLengths;
// For saving state if end of current ByteBuf was reached
int currentGroup;
int currentLength = -1;
int currentAlpha;
boolean modifyLength;
Bzip2HuffmanStageDecoder(final Bzip2BitReader reader, final int totalTables, final int alphabetSize) {
this.reader = reader;
this.totalTables = totalTables;
this.alphabetSize = alphabetSize;
Defined In
Source
Frequently Asked Questions
What is the Bzip2HuffmanStageDecoder class?
Bzip2HuffmanStageDecoder is a class in the netty codebase, defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2HuffmanStageDecoder.java.
Where is Bzip2HuffmanStageDecoder defined?
Bzip2HuffmanStageDecoder is defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2HuffmanStageDecoder.java at line 25.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free