write(int)close(ByteBuf) (through Bzip2DivSufSort)close(ByteBuf)close(ByteBuf) (through Bzip2HuffmanStageEncoder)close(ByteBuf) (through Bzip2HuffmanStageEncoder)close(ByteBuf) (through Bzip2HuffmanStageEncoder)close(ByteBuf) (through Bzip2HuffmanStageEncoder)
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | block
The RLE'd block data. |
| private int | blockLength
Current length of the data within the |
| private final int | blockLengthLimit
A limit beyond which new data will not be accepted into the block. |
| private final boolean[] | blockValuesPresent
The values that are present within the RLE'd block data. |
| private final int[] | bwtBlock
The Burrows Wheeler Transformed block data. |
| private final Crc32 | crc
CRC builder for the block. |
| private int | rleCurrentValue
The current RLE value being accumulated (undefined when |
| private int | rleLength
The repeat count of the current RLE value. |
| private final ByteProcessor | |
| private final Bzip2BitWriter | writer
A writer that provides bit-level writes. |
| Access | Constructor and Description |
|---|---|
| pack-priv | Bzip2BlockCompressor(final Bzip2BitWriter
The writer, final int Bzip2BitWriter which provides bit-level writesThe declared block size in bytes. Up to this many bytes will be accepted
into the block after Run-Length Encoding is applied blockSize)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | Returns: Number of available bytes which can be writtenGets available size of the current block. |
| pack-priv void | |
| pack-priv int | |
| pack-priv boolean | Returns: true if one or more bytes has been written to the block, otherwise falseDetermines if any bytes have been written to the block. |
| pack-priv boolean | Returns: true if the block is full, otherwise falseDetermines if the block is full and ready for compression. |
| pack-priv boolean | Returns: true if the byte was written, or false if the block is already fullThe byte to write value)Writes a byte to the block, accumulating to an RLE run where possible. |
| pack-priv int | Returns: The actual number of input bytes written. May be less than the number requested, or zero if the block is already fullThe buffer to write buffer, int The offset within the input data to write from offset, int The number of bytes of input data to write length)Writes an array to the block. |
| private void | writeRun(final int
The value to write value, int The run length of the value to write runLength)Writes an RLE run to the block array, updating the block CRC and present values array as required. |
| private void |
| block | back to summary |
|---|---|
| private final byte[] block The RLE'd block data. | |
| blockLength | back to summary |
|---|---|
| private int blockLength Current length of the data within the | |
| blockLengthLimit | back to summary |
|---|---|
| private final int blockLengthLimit A limit beyond which new data will not be accepted into the block. | |
| blockValuesPresent | back to summary |
|---|---|
| private final boolean[] blockValuesPresent The values that are present within the RLE'd block data. For each index, | |
| bwtBlock | back to summary |
|---|---|
| private final int[] bwtBlock The Burrows Wheeler Transformed block data. | |
| crc | back to summary |
|---|---|
| private final Crc32 crc CRC builder for the block. | |
| rleCurrentValue | back to summary |
|---|---|
| private int rleCurrentValue The current RLE value being accumulated (undefined when | |
| rleLength | back to summary |
|---|---|
| private int rleLength The repeat count of the current RLE value. | |
| writeProcessor | back to summary |
|---|---|
| private final ByteProcessor writeProcessor | |
| writer | back to summary |
|---|---|
| private final Bzip2BitWriter writer A writer that provides bit-level writes. | |
| Bzip2BlockCompressor | back to summary |
|---|---|
pack-priv Bzip2BlockCompressor(final Bzip2BitWriter writer, final int blockSize)
| |
| availableSize | back to summary |
|---|---|
| pack-priv int availableSize() Gets available size of the current block.
| |
| close | back to summary |
|---|---|
| pack-priv void close(ByteBuf out) Compresses and writes out the block. | |
| crc | back to summary |
|---|---|
| pack-priv int crc() Gets the CRC of the completed block. Only valid after calling
| |
| isEmpty | back to summary |
|---|---|
| pack-priv boolean isEmpty() Determines if any bytes have been written to the block.
| |
| isFull | back to summary |
|---|---|
| pack-priv boolean isFull() Determines if the block is full and ready for compression.
| |
| write | back to summary |
|---|---|
| pack-priv boolean write(final int value) Writes a byte to the block, accumulating to an RLE run where possible.
| |
| write | back to summary |
|---|---|
| pack-priv int write(final ByteBuf buffer, int offset, int length) Writes an array to the block.
| |
| writeRun | back to summary |
|---|---|
| private void writeRun(final int value, int runLength) Writes an RLE run to the block array, updating the block CRC and present values array as required.
| |
| writeSymbolMap | back to summary |
|---|---|
| private void writeSymbolMap(ByteBuf out) Write the Huffman symbol to output byte map. | |