SevenZipLZMA2CompressionSettings
Inheritance: java.lang.Object, com.aspose.zip.SevenZipCompressionSettings
public class SevenZipLZMA2CompressionSettings extends SevenZipCompressionSettings
Settings for LZMA2 compression method within 7z archive.
LZMA2 supports multiple runs of compressed LZMA data and uncompressed data.
See more: Lempel\u2013Ziv\u2013Markov_chain_algorithm
Constructors
Constructor | Description |
---|---|
SevenZipLZMA2CompressionSettings() | Instantiates settings for LZMA2 compression method within 7z archive. |
SevenZipLZMA2CompressionSettings(int dictionarySize) | Instantiates settings for LZMA2 compression method within 7z archive. |
SevenZipLZMA2CompressionSettings(int dictionarySize, int fastBytes) | Instantiates settings for LZMA2 compression method within 7z archive. |
Methods
Method | Description |
---|---|
getCompressionThreads() | Gets compression thread count. |
getDictionarySize() | Dictionary (history buffer) size indicates how many bytes of the recently processed uncompressed data is kept in memory. |
getFastBytes() | Gets the controls number of fast bytes used by the LZMA2 compressor. |
getMethod() | Gets compression or decompression method. |
setCompressionThreads(int value) | Sets compression thread count. |
SevenZipLZMA2CompressionSettings()
public SevenZipLZMA2CompressionSettings()
Instantiates settings for LZMA2 compression method within 7z archive.
SevenZipLZMA2CompressionSettings(int dictionarySize)
public SevenZipLZMA2CompressionSettings(int dictionarySize)
Instantiates settings for LZMA2 compression method within 7z archive.
Parameters:
Parameter | Type | Description |
---|---|---|
dictionarySize | int | size of history buffer, must be between 4096 and 1073741824. |
The bigger the dictionary, the better the compression ratio usually is, but dictionaries bigger than the uncompressed data are waste of RAM. |
SevenZipLZMA2CompressionSettings(int dictionarySize, int fastBytes)
public SevenZipLZMA2CompressionSettings(int dictionarySize, int fastBytes)
Instantiates settings for LZMA2 compression method within 7z archive.
Parameters:
Parameter | Type | Description |
---|---|---|
dictionarySize | int | size of history buffer, must be between 4096 and 1073741824. |
The bigger the dictionary, the better the compression ratio usually is, but dictionaries bigger than the uncompressed data are waste of RAM. | | fastBytes | int | controls number of fast bytes used by the LZMA2 compressors. A larger number of fast bytes can provide a better compression ratio at the expense of compression speed. |
getCompressionThreads()
public final int getCompressionThreads()
Gets compression thread count. If the value greater than 1, multithreading compression will be used.
Returns: int - compression thread count
getDictionarySize()
public final int getDictionarySize()
Dictionary (history buffer) size indicates how many bytes of the recently processed uncompressed data is kept in memory.
Returns: int - dictionary (history buffer) size
getFastBytes()
public final int getFastBytes()
Gets the controls number of fast bytes used by the LZMA2 compressor.
Returns: int - the controls number of fast bytes used by the LZMA2 compressor
getMethod()
public SevenZipCompressionMethod getMethod()
Gets compression or decompression method.
Returns: SevenZipCompressionMethod - compression or decompression method.
setCompressionThreads(int value)
public final void setCompressionThreads(int value)
Sets compression thread count. If the value greater than 1, multithreading compression will be used.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | compression thread count. |
Do not set this number more than CPU cores. |