Bzip2Constants Class — netty Architecture
Architecture documentation for the Bzip2Constants class in Bzip2Constants.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 30ebd78f_8045_8a1c_abe3_e95f5dd6abc7["Bzip2Constants"] 6d4d549d_fb70_3020_1f2e_9f7b00506419["Bzip2Constants.java"] 30ebd78f_8045_8a1c_abe3_e95f5dd6abc7 -->|defined in| 6d4d549d_fb70_3020_1f2e_9f7b00506419 4841e56e_9ed2_f235_fbf0_6f4bf6903a91["Bzip2Constants()"] 30ebd78f_8045_8a1c_abe3_e95f5dd6abc7 -->|method| 4841e56e_9ed2_f235_fbf0_6f4bf6903a91
Relationship Graph
Source Code
codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2Constants.java lines 21–106
final class Bzip2Constants {
/**
* Magic number of Bzip2 stream.
*/
static final int MAGIC_NUMBER = 'B' << 16 | 'Z' << 8 | 'h';
/**
* Block header magic number. Equals to BCD (pi).
*/
static final int BLOCK_HEADER_MAGIC_1 = 0x314159;
static final int BLOCK_HEADER_MAGIC_2 = 0x265359;
/**
* End of stream magic number. Equals to BCD sqrt(pi).
*/
static final int END_OF_STREAM_MAGIC_1 = 0x177245;
static final int END_OF_STREAM_MAGIC_2 = 0x385090;
/**
* Base block size.
*/
static final int BASE_BLOCK_SIZE = 100000;
/**
* Minimum and maximum size of one block.
* Must be multiplied by {@link Bzip2Constants#BASE_BLOCK_SIZE}.
*/
static final int MIN_BLOCK_SIZE = 1;
static final int MAX_BLOCK_SIZE = 9;
static final int MAX_BLOCK_LENGTH = MAX_BLOCK_SIZE * BASE_BLOCK_SIZE;
/**
* Maximum possible Huffman alphabet size.
*/
static final int HUFFMAN_MAX_ALPHABET_SIZE = 258;
/**
* The longest Huffman code length created by the encoder.
*/
static final int HUFFMAN_ENCODE_MAX_CODE_LENGTH = 20;
/**
* The longest Huffman code length accepted by the decoder.
*/
static final int HUFFMAN_DECODE_MAX_CODE_LENGTH = 23;
/**
* Huffman symbols used for run-length encoding.
*/
static final int HUFFMAN_SYMBOL_RUNA = 0;
static final int HUFFMAN_SYMBOL_RUNB = 1;
/**
* Huffman symbols range size for Huffman used map.
*/
static final int HUFFMAN_SYMBOL_RANGE_SIZE = 16;
/**
* Maximum length of zero-terminated bit runs of MTF'ed Huffman table.
*/
static final int HUFFMAN_SELECTOR_LIST_MAX_LENGTH = 6;
/**
* Number of symbols decoded after which a new Huffman table is selected.
*/
static final int HUFFMAN_GROUP_RUN_LENGTH = 50;
/**
* Maximum possible number of Huffman table selectors.
*/
static final int MAX_SELECTORS = 2 + 900000 / HUFFMAN_GROUP_RUN_LENGTH; // 18002
/**
* Minimum number of alternative Huffman tables.
*/
static final int HUFFMAN_MINIMUM_TABLES = 2;
/**
* Maximum number of alternative Huffman tables.
Source
Frequently Asked Questions
What is the Bzip2Constants class?
Bzip2Constants is a class in the netty codebase, defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2Constants.java.
Where is Bzip2Constants defined?
Bzip2Constants is defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2Constants.java at line 21.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free