Buffer using the deflate algorithm.
| Modifier and Type | Class and Description |
|---|---|
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private final CRC32 | |
| private final Deflater | |
| private static final byte[] | |
| private static final InternalLogger | |
| private static final int | MAX_INITIAL_OUTPUT_BUFFER_SIZE
Maximum initial size for temporary heap buffers used for the compressed output. |
| private ZlibCompressor. | |
| private final ZlibWrapper | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public Buffer | compress(Buffer
the uncompressed, 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 | |
| private void | |
| private void | |
| 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 zlib compressor factory with the default compression level ( |
| public static Supplier | newFactory(int
1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.Creates a zlib compressor factory with the specified |
| public static Supplier | Returns: the factory.Creates a zlib compressor factory with the default compression level ( |
| public static Supplier | Returns: the factory.1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.Creates a zlib compressor factory with the specified |
| public static Supplier | Returns: the factory.the preset dictionary dictionary)Creates a zlib compressor factory with the default compression level ( |
| public static Supplier | Returns: the factory.1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.the preset dictionary dictionary)Creates a zlib compressor factory with the specified |
| crc | back to summary |
|---|---|
| private final CRC32 crc | |
| deflater | back to summary |
|---|---|
| private final Deflater deflater | |
| gzipHeader | back to summary |
|---|---|
| private static final byte[] gzipHeader | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| MAX_INITIAL_OUTPUT_BUFFER_SIZE | back to summary |
|---|---|
| private static final int MAX_INITIAL_OUTPUT_BUFFER_SIZE Maximum initial size for temporary heap buffers used for the compressed output. Buffer may still grow beyond this if necessary. | |
| state | back to summary |
|---|---|
| private ZlibCompressor. | |
| wrapper | back to summary |
|---|---|
| private final ZlibWrapper wrapper | |
| writeHeader | back to summary |
|---|---|
| private boolean writeHeader | |
| ZlibCompressor | back to summary |
|---|---|
| private ZlibCompressor(ZlibWrapper wrapper, int compressionLevel) | |
| ZlibCompressor | back to summary |
|---|---|
| private ZlibCompressor(int compressionLevel, byte[] dictionary) | |
| close | back to summary |
|---|---|
| public void close() Implements io. Doc from io. #
Close the compressor. After this method was called
| |
| compress | back to summary |
|---|---|
| public Buffer compress(Buffer uncompressed, BufferAllocator allocator) throws CompressionException Implements io. Doc from io. This method will read from the input
| |
| compressData | back to summary |
|---|---|
| private Buffer compressData(Buffer uncompressed, BufferAllocator allocator) | |
| compressData | back to summary |
|---|---|
| private void compressData(ByteBuffer in, Buffer out) | |
| deflate | back to summary |
|---|---|
| private void deflate(Buffer out) | |
| 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 zlib compressor factory with the default compression level (
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates a zlib compressor factory with the specified
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates a zlib compressor factory with the default compression level (
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates a zlib compressor factory with the specified
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates a zlib compressor factory with the default compression level (
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates a zlib compressor factory with the specified
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final ZlibCompressor. | |
| public static final ZlibCompressor. | |
| public static final ZlibCompressor. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ZlibCompressor. | |
| public static ZlibCompressor. |
| CLOSED | back to summary |
|---|---|
| public static final ZlibCompressor. | |
| FINISHED | back to summary |
|---|---|
| public static final ZlibCompressor. | |
| PROCESSING | back to summary |
|---|---|
| public static final ZlibCompressor. | |
| State | back to summary |
|---|---|
| private State() | |
| valueOf | back to summary |
|---|---|
| public static ZlibCompressor. | |
| values | back to summary |
|---|---|
| public static ZlibCompressor. | |