Bzip2BlockDecompressor Class — netty Architecture
Architecture documentation for the Bzip2BlockDecompressor class in Bzip2BlockDecompressor.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 5e864d32_96fc_3bee_77e4_3eeb1e9d6e8d["Bzip2BlockDecompressor"] e9790599_c2ed_fb20_c7d5_da051f26c939["Bzip2BlockDecompressor.java"] 5e864d32_96fc_3bee_77e4_3eeb1e9d6e8d -->|defined in| e9790599_c2ed_fb20_c7d5_da051f26c939 55084f05_c9d3_d5e3_5297_21738559f2c3["Bzip2BlockDecompressor()"] 5e864d32_96fc_3bee_77e4_3eeb1e9d6e8d -->|method| 55084f05_c9d3_d5e3_5297_21738559f2c3 5a74d419_86a2_df2c_f8a8_4431b8d8f002["decodeHuffmanData()"] 5e864d32_96fc_3bee_77e4_3eeb1e9d6e8d -->|method| 5a74d419_86a2_df2c_f8a8_4431b8d8f002 53f222c8_eda8_7c97_2c97_0b36e2249292["initialiseInverseBWT()"] 5e864d32_96fc_3bee_77e4_3eeb1e9d6e8d -->|method| 53f222c8_eda8_7c97_2c97_0b36e2249292 fab9e775_efed_58a1_4371_9a4cc6690133["read()"] 5e864d32_96fc_3bee_77e4_3eeb1e9d6e8d -->|method| fab9e775_efed_58a1_4371_9a4cc6690133 d2ed781b_719e_980f_4eff_c05fa72e51bb["decodeNextBWTByte()"] 5e864d32_96fc_3bee_77e4_3eeb1e9d6e8d -->|method| d2ed781b_719e_980f_4eff_c05fa72e51bb a73d586a_c9e5_803f_6d1e_5b14f7dd7bec["blockLength()"] 5e864d32_96fc_3bee_77e4_3eeb1e9d6e8d -->|method| a73d586a_c9e5_803f_6d1e_5b14f7dd7bec 86ce8518_afaa_1d61_28a6_16201ebac9e4["checkCRC()"] 5e864d32_96fc_3bee_77e4_3eeb1e9d6e8d -->|method| 86ce8518_afaa_1d61_28a6_16201ebac9e4
Relationship Graph
Source Code
codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2BlockDecompressor.java lines 36–350
final class Bzip2BlockDecompressor {
/**
* A reader that provides bit-level reads.
*/
private final Bzip2BitReader reader;
/**
* Calculates the block CRC from the fully decoded bytes of the block.
*/
private final Crc32 crc = new Crc32();
/**
* The CRC of the current block as read from the block header.
*/
private final int blockCRC;
/**
* {@code true} if the current block is randomised, otherwise {@code false}.
*/
private final boolean blockRandomised;
/* Huffman Decoding stage */
/**
* The end-of-block Huffman symbol. Decoding of the block ends when this is encountered.
*/
int huffmanEndOfBlockSymbol;
/**
* Bitmap, of ranges of 16 bytes, present/not present.
*/
int huffmanInUse16;
/**
* A map from Huffman symbol index to output character. Some types of data (e.g. ASCII text)
* may contain only a limited number of byte values; Huffman symbols are only allocated to
* those values that actually occur in the uncompressed data.
*/
final byte[] huffmanSymbolMap = new byte[256];
/* Move To Front stage */
/**
* Counts of each byte value within the {@link Bzip2BlockDecompressor#huffmanSymbolMap} data.
* Collected at the Move To Front stage, consumed by the Inverse Burrows Wheeler Transform stage.
*/
private final int[] bwtByteCounts = new int[256];
/**
* The Burrows-Wheeler Transform processed data. Read at the Move To Front stage, consumed by the
* Inverse Burrows Wheeler Transform stage.
*/
private final byte[] bwtBlock;
/**
* Starting pointer into BWT for after untransform.
*/
private final int bwtStartPointer;
/* Inverse Burrows-Wheeler Transform stage */
/**
* At each position contains the union of :-
* An output character (8 bits)
* A pointer from each position to its successor (24 bits, left shifted 8 bits)
* As the pointer cannot exceed the maximum block size of 900k, 24 bits is more than enough to
* hold it; Folding the character data into the spare bits while performing the inverse BWT,
* when both pieces of information are available, saves a large number of memory accesses in
* the final decoding stages.
*/
private int[] bwtMergedPointers;
/**
* The current merged pointer into the Burrow-Wheeler Transform array.
*/
private int bwtCurrentMergedPointer;
/**
* The actual length in bytes of the current block at the Inverse Burrows Wheeler Transform
* stage (before final Run-Length Decoding).
*/
private int bwtBlockLength;
/**
Defined In
Source
Frequently Asked Questions
What is the Bzip2BlockDecompressor class?
Bzip2BlockDecompressor is a class in the netty codebase, defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2BlockDecompressor.java.
Where is Bzip2BlockDecompressor defined?
Bzip2BlockDecompressor is defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2BlockDecompressor.java at line 36.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free