Buffer using the FastLZ algorithm.
See FastLZ format.
| Modifier and Type | Class and Description |
|---|---|
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private final BufferChecksum | checksum
Underlying checksum calculator in use. |
| private final int | level
Compression level. |
| private FastLzCompressor. |
| Access | Constructor and Description |
|---|---|
| private | FastLzCompressor(int
supports only these values:
0 - Encoder will choose level automatically depending on the length of the input buffer.
1 - Level 1 is the fastest compression and generally useful for short data.
2 - Level 2 is slightly slower but it gives better compression ratio. level, Checksum the checksum)Checksum instance to use to check data for integrity.
You may set null if you don't want to validate checksum of each block.Creates a FastLZ encoder with specified compression level and checksum calculator. |
| Modifier and Type | Method and Description |
|---|---|
| public 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 FastLZ compressor factory without checksum calculator and with auto detection of compression level. |
| public static Supplier | Returns: the factory.supports only these values:
0 - Encoder will choose level automatically depending on the length of the input buffer.
1 - Level 1 is the fastest compression and generally useful for short data.
2 - Level 2 is slightly slower but it gives better compression ratio. level)Creates a FastLZ compressor factory with specified compression level and without checksum calculator. |
| public static Supplier | Returns: the factory.If true, the checksum of each block will be calculated and this value
will be added to the header of block.
By default validateChecksums)FastLzCompressor uses java.
for checksum calculation.Creates a FastLZ compressor factory with auto detection of compression level and calculation of checksums as specified. |
| public static Supplier | Returns: the factory.supports only these values:
0 - Encoder will choose level automatically depending on the length of the input buffer.
1 - Level 1 is the fastest compression and generally useful for short data.
2 - Level 2 is slightly slower but it gives better compression ratio. level, Checksum the checksum)Checksum instance to use to check data for integrity.
You may set null if you don't want to validate checksum of each block.Creates a FastLZ compressor factory with specified compression level and checksum calculator. |
| checksum | back to summary |
|---|---|
| private final BufferChecksum checksum Underlying checksum calculator in use. | |
| level | back to summary |
|---|---|
| private final int level Compression level. | |
| state | back to summary |
|---|---|
| private FastLzCompressor. | |
| FastLzCompressor | back to summary |
|---|---|
| private FastLzCompressor(int level, Checksum checksum) Creates a FastLZ encoder with specified compression level and checksum calculator.
| |
| 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 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 FastLZ compressor factory without checksum calculator and with auto detection of compression level.
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates a FastLZ compressor factory with specified compression level and without checksum calculator.
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates a FastLZ compressor factory with auto detection of compression level and calculation of checksums as specified.
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates a FastLZ compressor factory with specified compression level and checksum calculator.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final FastLzCompressor. | |
| public static final FastLzCompressor. | |
| public static final FastLzCompressor. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static FastLzCompressor. | |
| public static FastLzCompressor. |
| CLOSED | back to summary |
|---|---|
| public static final FastLzCompressor. | |
| FINISHED | back to summary |
|---|---|
| public static final FastLzCompressor. | |
| PROCESSING | back to summary |
|---|---|
| public static final FastLzCompressor. | |
| State | back to summary |
|---|---|
| private State() | |
| valueOf | back to summary |
|---|---|
| public static FastLzCompressor. | |
| values | back to summary |
|---|---|
| public static FastLzCompressor. | |