Class SevenZipLZMA2CompressionSettings

    • Constructor Detail

      • SevenZipLZMA2CompressionSettings

        public SevenZipLZMA2CompressionSettings()

        Instantiates settings for LZMA2 compression method within 7z archive.

      • SevenZipLZMA2CompressionSettings

        public SevenZipLZMA2CompressionSettings​(int dictionarySize)

        Instantiates settings for LZMA2 compression method within 7z archive.

        Parameters:
        dictionarySize - the size of history buffer, must be between 4096 and 1073741824.

        The bigger the dictionary, usually the better the compression ratio is - but dictionaries larger than the uncompressed data are a waste of RAM.

        Throws:
        com.aspose.ms.System.ArgumentOutOfRangeException - dictionarySize is too big or too small.
      • SevenZipLZMA2CompressionSettings

        public SevenZipLZMA2CompressionSettings​(int dictionarySize,
                                                int fastBytes)

        Instantiates settings for LZMA2 compression method within 7z archive.

        Parameters:
        dictionarySize - the size of history buffer, must be between 4096 and 1073741824.

        The bigger the dictionary, usually the better the compression ratio is - but dictionaries larger than the uncompressed data are a waste of RAM.

        fastBytes - controls the 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.
        Throws:
        com.aspose.ms.System.ArgumentOutOfRangeException - dictionarySize is too big or too small, or fastBytes is too big or too small.
    • Method Detail

      • getCompressionThreads

        public final int getCompressionThreads()

        Gets compression thread count. If the value is greater than 1, multithreading compression will be used.

        Returns:
        compression thread count
      • setCompressionThreads

        public final void setCompressionThreads​(int value)

        Sets compression thread count. If the value is greater than 1, multithreading compression will be used.

        Parameters:
        value - compression thread count.

        Do not set this number more than CPU cores.

        Throws:
        com.aspose.ms.System.ArgumentOutOfRangeException - The number of threads is more than 32.
      • getDictionarySize

        public final int getDictionarySize()

        Dictionary (history buffer) size indicates how many bytes of the recently processed uncompressed data are kept in memory.

        Returns:
        dictionary (history buffer) size
      • getFastBytes

        public final int getFastBytes()

        Gets the control number of fast bytes used by the LZMA2 compressor.

        Returns:
        the control number of fast bytes used by the LZMA2 compressor