| Modifier and Type | Class and Description |
|---|---|
| private static enum | |
| private static enum | Bzip2Compressor.
Current state of stream. |
| Modifier and Type | Field and Description |
|---|---|
| private Bzip2BlockCompressor | blockCompressor
The compressor for the current block. |
| private Bzip2Compressor. | |
| private Bzip2Compressor. | |
| private final int | streamBlockSize
The declared maximum block size of the stream (before final run-length decoding). |
| private int | streamCRC
The merged CRC of all blocks compressed so far. |
| private final Bzip2BitWriter | writer
A writer that provides bit-level writes. |
| Access | Constructor and Description |
|---|---|
| private | Bzip2Compressor(final int
The Bzip2 block size as a multiple of 100,000 bytes (minimum blockSizeMultiplier)1, maximum 9).
Larger block sizes require more memory for both compression and decompression,
but give better compression ratios. 9 will usually be the best value to use.Creates a new bzip2 compressor with the specified |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private void | |
| public Buffer | compress(Buffer
the in, BufferAllocator Buffer that contains the data to be compressed.the allocator)BufferAllocator that is used to allocate a new buffer (if needed) to write the
compressed bytes too.Implements io. Buffer and compress into a new Buffer that will be
allocated (if needed) from the BufferAllocator.
|
| private Buffer | |
| public Buffer | finish(BufferAllocator allocator)
Implements io. |
| public boolean | isClosed()
Implements io. true if the decompressor was closed, false otherwise.
|
| public boolean | isFinished()
Implements io. true if the compressor was finished or closed.
|
| public static Supplier | Returns: the factory.Creates a new bzip2 compressor factory with the maximum (900,000 byte) block size. |
| public static Supplier | Returns: the factory.The Bzip2 block size as a multiple of 100,000 bytes (minimum blockSizeMultiplier)1, maximum 9).
Larger block sizes require more memory for both compression and decompression,
but give better compression ratios. 9 will usually be the best value to use.Creates a new bzip2 compressor factory with the specified |
| blockCompressor | back to summary |
|---|---|
| private Bzip2BlockCompressor blockCompressor The compressor for the current block. | |
| compressorState | back to summary |
|---|---|
| private Bzip2Compressor. | |
| currentState | back to summary |
|---|---|
| private Bzip2Compressor. | |
| streamBlockSize | back to summary |
|---|---|
| private final int streamBlockSize The declared maximum block size of the stream (before final run-length decoding). | |
| streamCRC | back to summary |
|---|---|
| private int streamCRC The merged CRC of all blocks compressed so far. | |
| writer | back to summary |
|---|---|
| private final Bzip2BitWriter writer A writer that provides bit-level writes. | |
| Bzip2Compressor | back to summary |
|---|---|
| private Bzip2Compressor(final int blockSizeMultiplier) Creates a new bzip2 compressor with the specified
| |
| close | back to summary |
|---|---|
| public void close() Implements io. Doc from io. #
Close the compressor. After this method was called
| |
| closeBlock | back to summary |
|---|---|
| private void closeBlock(Buffer out) Close current block and update | |
| compress | back to summary |
|---|---|
| public Buffer compress(Buffer in, BufferAllocator allocator) throws CompressionException Implements io. Doc from io. This method will read from the input
| |
| compressData | back to summary |
|---|---|
| private Buffer compressData(Buffer in, BufferAllocator allocator) | |
| finish | back to summary |
|---|---|
| public Buffer finish(BufferAllocator allocator) Implements io. Doc from io. By calling this method we signal that the compression stream is marked as finish. The returned | |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Implements io. Doc from io. Return
| |
| isFinished | back to summary |
|---|---|
| public boolean isFinished() Implements io. Doc from io. Returns
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates a new bzip2 compressor factory with the maximum (900,000 byte) block size.
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates a new bzip2 compressor factory with the specified
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final Bzip2Compressor. | |
| public static final Bzip2Compressor. | |
| public static final Bzip2Compressor. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Bzip2Compressor. | |
| public static Bzip2Compressor. |
| CLOSED | back to summary |
|---|---|
| public static final Bzip2Compressor. | |
| FINISHED | back to summary |
|---|---|
| public static final Bzip2Compressor. | |
| PROCESSING | back to summary |
|---|---|
| public static final Bzip2Compressor. | |
| CompressorState | back to summary |
|---|---|
| private CompressorState() | |
| valueOf | back to summary |
|---|---|
| public static Bzip2Compressor. | |
| values | back to summary |
|---|---|
| public static Bzip2Compressor. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Bzip2Compressor. | |
| public static final Bzip2Compressor. | |
| public static final Bzip2Compressor. | |
| public static final Bzip2Compressor. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Bzip2Compressor. | |
| public static Bzip2Compressor. |
| CLOSE_BLOCK | back to summary |
|---|---|
| public static final Bzip2Compressor. | |
| INIT | back to summary |
|---|---|
| public static final Bzip2Compressor. | |
| INIT_BLOCK | back to summary |
|---|---|
| public static final Bzip2Compressor. | |
| WRITE_DATA | back to summary |
|---|---|
| public static final Bzip2Compressor. | |
| State | back to summary |
|---|---|
| private State() | |
| valueOf | back to summary |
|---|---|
| public static Bzip2Compressor. | |
| values | back to summary |
|---|---|
| public static Bzip2Compressor. | |