ChunkEncoder to compress individual chunks and
combines resulting chunks into contiguous output byte array.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| public static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static int | appendEncoded(byte[] input, int inputPtr, int inputLength, byte[] outputBuffer, int outputPtr)
Alternate version that accepts pre-allocated output buffer. |
| public static int | appendEncoded(byte[] input, int inputPtr, int inputLength, byte[] outputBuffer, int outputPtr, BufferRecycler bufferRecycler)
Alternate version that accepts pre-allocated output buffer. |
| public static int | appendEncoded(ChunkEncoder enc, byte[] input, int inputPtr, int inputLength, byte[] outputBuffer, int outputPtr)
Alternate version that accepts pre-allocated output buffer. |
| public static byte[] | encode(byte[] data)
Method for compressing given input data using LZF encoding and block structure (compatible with lzf command line utility). |
| public static byte[] | encode(byte[] data, int offset, int length)
Method for compressing given input data using LZF encoding and block structure (compatible with lzf command line utility). |
| public static byte[] | encode(byte[] data, int offset, int length, BufferRecycler bufferRecycler)
Method for compressing given input data using LZF encoding and block structure (compatible with lzf command line utility). |
| public static byte[] | encode(ChunkEncoder enc, byte[] data, int length)
Compression method that uses specified |
| public static byte[] | encode(ChunkEncoder enc, byte[] data, int offset, int length)
Method that encodes given input using provided |
| public static int | estimateMaxWorkspaceSize(int inputSize)
Helper method that can be used to estimate maximum space needed to try compression of given amount of data. |
| public static int | safeAppendEncoded(byte[] input, int inputPtr, int inputLength, byte[] outputBuffer, int outputPtr)
Alternate version that accepts pre-allocated output buffer. |
| public static int | safeAppendEncoded(byte[] input, int inputPtr, int inputLength, byte[] outputBuffer, int outputPtr, BufferRecycler bufferRecycler)
Alternate version that accepts pre-allocated output buffer. |
| public static byte[] | safeEncode(byte[] data)
Method that will use "safe" |
| public static byte[] | safeEncode(byte[] data, int offset, int length)
Method that will use "safe" |
| public static byte[] | safeEncode(byte[] data, int offset, int length, BufferRecycler bufferRecycler)
Method that will use "safe" |
| FULL_UNCOMP_ENCODED_CHUNK | back to summary |
|---|---|
| private static final int FULL_UNCOMP_ENCODED_CHUNK | |
| MAX_CHUNK_RESULT_SIZE | back to summary |
|---|---|
| public static final int MAX_CHUNK_RESULT_SIZE | |
| MAX_CHUNK_WORKSPACE_SIZE | back to summary |
|---|---|
| private static final int MAX_CHUNK_WORKSPACE_SIZE | |
| LZFEncoder | back to summary |
|---|---|
| private LZFEncoder() | |
| appendEncoded | back to summary |
|---|---|
| public static int appendEncoded(byte[] input, int inputPtr, int inputLength, byte[] outputBuffer, int outputPtr) Alternate version that accepts pre-allocated output buffer.
Note that | |
| appendEncoded | back to summary |
|---|---|
| public static int appendEncoded(byte[] input, int inputPtr, int inputLength, byte[] outputBuffer, int outputPtr, BufferRecycler bufferRecycler) Alternate version that accepts pre-allocated output buffer.
Note that | |
| appendEncoded | back to summary |
|---|---|
| public static int appendEncoded(ChunkEncoder enc, byte[] input, int inputPtr, int inputLength, byte[] outputBuffer, int outputPtr) Alternate version that accepts pre-allocated output buffer. | |
| encode | back to summary |
|---|---|
| public static byte[] encode(byte[] data) Method for compressing given input data using LZF encoding and block structure (compatible with lzf command line utility). Result consists of a sequence of chunks.
Note that | |
| encode | back to summary |
|---|---|
| public static byte[] encode(byte[] data, int offset, int length) Method for compressing given input data using LZF encoding and block structure (compatible with lzf command line utility). Result consists of a sequence of chunks.
Note that | |
| encode | back to summary |
|---|---|
| public static byte[] encode(byte[] data, int offset, int length, BufferRecycler bufferRecycler) Method for compressing given input data using LZF encoding and block structure (compatible with lzf command line utility). Result consists of a sequence of chunks.
Note that | |
| encode | back to summary |
|---|---|
| public static byte[] encode(ChunkEncoder enc, byte[] data, int length) Compression method that uses specified | |
| encode | back to summary |
|---|---|
| public static byte[] encode(ChunkEncoder enc, byte[] data, int offset, int length) Method that encodes given input using provided Note method does NOT call | |
| estimateMaxWorkspaceSize | back to summary |
|---|---|
| public static int estimateMaxWorkspaceSize(int inputSize) Helper method that can be used to estimate maximum space needed to try compression of given amount of data. This is slightly larger than maximum resulting content since compressor has a choice of uncompressed chunks to use, but that is only done after compression fails to reduce size; and this temporary expansion of up to 3.3% or so (1 indicator for every 31 bytes of uncompressed data) is more than what eventual expansion would be (5 bytes header per each uncompressed chunk, usually 0.01%). | |
| safeAppendEncoded | back to summary |
|---|---|
| public static int safeAppendEncoded(byte[] input, int inputPtr, int inputLength, byte[] outputBuffer, int outputPtr) Alternate version that accepts pre-allocated output buffer.
Method that will use "safe" | |
| safeAppendEncoded | back to summary |
|---|---|
| public static int safeAppendEncoded(byte[] input, int inputPtr, int inputLength, byte[] outputBuffer, int outputPtr, BufferRecycler bufferRecycler) Alternate version that accepts pre-allocated output buffer.
Method that will use "safe" | |
| safeEncode | back to summary |
|---|---|
| public static byte[] safeEncode(byte[] data) Method that will use "safe" | |
| safeEncode | back to summary |
|---|---|
| public static byte[] safeEncode(byte[] data, int offset, int length) Method that will use "safe" | |
| safeEncode | back to summary |
|---|---|
| public static byte[] safeEncode(byte[] data, int offset, int length, BufferRecycler bufferRecycler) Method that will use "safe" | |