| Modifier and Type | Class and Description |
|---|---|
| private static enum | Bzip2Encoder.State
Current state of stream. |
| Modifier and Type | Field and Description |
|---|---|
| private Bzip2BlockCompressor | blockCompressor
The compressor for the current block. |
| private volatile ChannelHandlerContext | ctx
Used to interact with its |
| private Bzip2Encoder. | |
| private volatile boolean | finished
(@code true} if the compressed stream has been finished, otherwise |
| 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 |
|---|---|
| public | |
| public | Bzip2Encoder(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 encoder with the specified |
| blockCompressor | back to summary |
|---|---|
| private Bzip2BlockCompressor blockCompressor The compressor for the current block. | |
| ctx | back to summary |
|---|---|
| private volatile ChannelHandlerContext ctx Used to interact with its | |
| currentState | back to summary |
|---|---|
| private Bzip2Encoder. | |
| finished | back to summary |
|---|---|
| private volatile boolean finished (@code true} if the compressed stream has been finished, otherwise | |
| 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. | |
| Bzip2Encoder | back to summary |
|---|---|
| public Bzip2Encoder() Creates a new bzip2 encoder with the maximum (900,000 byte) block size. | |
| Bzip2Encoder | back to summary |
|---|---|
| public Bzip2Encoder(final int blockSizeMultiplier) Creates a new bzip2 encoder with the specified
| |
| close | back to summary |
|---|---|
| public ChannelFuture close() Close this | |
| close | back to summary |
|---|---|
| public ChannelFuture close(final ChannelPromise promise) Close this | |
| close | back to summary |
|---|---|
| public void close(final ChannelHandlerContext ctx, final ChannelPromise promise) throws Exception Overrides io. Implements io. Doc from io. Calls
| |
| closeBlock | back to summary |
|---|---|
| private void closeBlock(ByteBuf out) Close current block and update | |
| ctx | back to summary |
|---|---|
| private ChannelHandlerContext ctx() | |
| encode | back to summary |
|---|---|
| protected void encode(ChannelHandlerContext ctx, ByteBuf in, ByteBuf out) throws Exception Implements abstract io. Doc from io. Encode a message into a
| |
| finishEncode | back to summary |
|---|---|
| private ChannelFuture finishEncode(final ChannelHandlerContext ctx, ChannelPromise promise) | |
| handlerAdded | back to summary |
|---|---|
| public void handlerAdded(ChannelHandlerContext ctx) throws Exception Overrides io. Implements io. Doc from io. Gets called after the
| |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Returns | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Bzip2Encoder. | |
| public static final Bzip2Encoder. | |
| public static final Bzip2Encoder. | |
| public static final Bzip2Encoder. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Bzip2Encoder. | |
| public static Bzip2Encoder. |
| CLOSE_BLOCK | back to summary |
|---|---|
| public static final Bzip2Encoder. | |
| INIT | back to summary |
|---|---|
| public static final Bzip2Encoder. | |
| INIT_BLOCK | back to summary |
|---|---|
| public static final Bzip2Encoder. | |
| WRITE_DATA | back to summary |
|---|---|
| public static final Bzip2Encoder. | |
| State | back to summary |
|---|---|
| private State() | |
| valueOf | back to summary |
|---|---|
| public static Bzip2Encoder. | |
| values | back to summary |
|---|---|
| public static Bzip2Encoder. | |