Buffer using the LZMA algorithm.
See LZMA
and LZMA format
or documents in LZMA SDK archive.
| Modifier and Type | Class and Description |
|---|---|
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private final Encoder | encoder
Underlying LZMA encoder in use. |
| private final int | littleEndianDictionarySize
Dictionary Size is stored as an unsigned 32-bit little endian integer. |
| private static final InternalLogger | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private final byte | properties
The Properties field contains three properties which are encoded using the following formula:
|
| private LzmaCompressor. | |
| private static boolean | warningLogged
For log warning only once. |
| Access | Constructor and Description |
|---|---|
| private | LzmaCompressor(int
the number of "literal context" bits, available values [0, 8], default value 3. lc, int the number of "literal position" bits, available values [0, 4], default value 0. lp, int the number of "position" bits, available values [0, 4], default value 2. pb, int available values [0, dictionarySize, boolean java.],
default value is 65536.indicates should endMarkerMode, int LzmaCompressor use end of stream marker or not.
Note, that LzmaCompressor always sets size of uncompressed data
in LZMA header, so EOS marker is unnecessary. But you may use it for
better portability. For full description see "LZMA Decoding modes" section
of LZMA-Specification.txt in official LZMA SDK.available values [5, 273]. numFastBytes)Creates LZMA compressor with specified settings. |
| Modifier and Type | Method and Description |
|---|---|
| private static Buffer | |
| 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.
|
| 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.
|
| private static int | maxOutputBufferLength(int inputLength)
Calculates maximum possible size of output buffer for not compressible data. |
| public static Supplier | |
| public static Supplier | Returns: the factory.Creates LZMA compressor factory with specified |
| public static Supplier | Returns: the factory.Creates LZMA compressor factory with specified dictionary size and default values of
|
| public static Supplier | Returns: the factory.Creates LZMA compressor factory with specified |
| public static Supplier | Returns: the factory.the number of "literal context" bits, available values [0, 8], default value 3. lc, int the number of "literal position" bits, available values [0, 4], default value 0. lp, int the number of "position" bits, available values [0, 4], default value 2. pb, int available values [0, dictionarySize, boolean java.],
default value is 65536.indicates should endMarkerMode, int LzmaCompressor use end of stream marker or not.
Note, that LzmaCompressor always sets size of uncompressed data
in LZMA header, so EOS marker is unnecessary. But you may use it for
better portability. For full description see "LZMA Decoding modes" section
of LZMA-Specification.txt in official LZMA SDK.available values [5, 273]. numFastBytes)Creates LZMA compressor factory with specified settings. |
| DEFAULT_LC | back to summary |
|---|---|
| private static final int DEFAULT_LC | |
| DEFAULT_LP | back to summary |
|---|---|
| private static final int DEFAULT_LP | |
| DEFAULT_MATCH_FINDER | back to summary |
|---|---|
| private static final int DEFAULT_MATCH_FINDER | |
| DEFAULT_PB | back to summary |
|---|---|
| private static final int DEFAULT_PB | |
| encoder | back to summary |
|---|---|
| private final Encoder encoder Underlying LZMA encoder in use. | |
| littleEndianDictionarySize | back to summary |
|---|---|
| private final int littleEndianDictionarySize Dictionary Size is stored as an unsigned 32-bit little endian integer. | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| MAX_FAST_BYTES | back to summary |
|---|---|
| private static final int MAX_FAST_BYTES | |
| MEDIUM_DICTIONARY_SIZE | back to summary |
|---|---|
| private static final int MEDIUM_DICTIONARY_SIZE | |
| MEDIUM_FAST_BYTES | back to summary |
|---|---|
| private static final int MEDIUM_FAST_BYTES | |
| MIN_FAST_BYTES | back to summary |
|---|---|
| private static final int MIN_FAST_BYTES | |
| properties | back to summary |
|---|---|
| private final byte properties The Properties field contains three properties which are encoded using the following formula:
| |
| state | back to summary |
|---|---|
| private LzmaCompressor. | |
| warningLogged | back to summary |
|---|---|
| private static boolean warningLogged For log warning only once. | |
| LzmaCompressor | back to summary |
|---|---|
| private LzmaCompressor(int lc, int lp, int pb, int dictionarySize, boolean endMarkerMode, int numFastBytes) Creates LZMA compressor with specified settings.
| |
| allocateBuffer | back to summary |
|---|---|
| private static Buffer allocateBuffer(Buffer in, BufferAllocator allocator) | |
| 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
| |
| 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
| |
| maxOutputBufferLength | back to summary |
|---|---|
| private static int maxOutputBufferLength(int inputLength) Calculates maximum possible size of output buffer for not compressible data. | |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates LZMA compressor factory with default settings.
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates LZMA compressor factory with specified
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates LZMA compressor factory with specified dictionary size and default values of
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates LZMA compressor factory with specified
| |
| newFactory | back to summary |
|---|---|
| public static Supplier Creates LZMA compressor factory with specified settings.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final LzmaCompressor. | |
| public static final LzmaCompressor. | |
| public static final LzmaCompressor. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static LzmaCompressor. | |
| public static LzmaCompressor. |
| CLOSED | back to summary |
|---|---|
| public static final LzmaCompressor. | |
| FINISHED | back to summary |
|---|---|
| public static final LzmaCompressor. | |
| PROCESSING | back to summary |
|---|---|
| public static final LzmaCompressor. | |
| State | back to summary |
|---|---|
| private State() | |
| valueOf | back to summary |
|---|---|
| public static LzmaCompressor. | |
| values | back to summary |
|---|---|
| public static LzmaCompressor. | |