SevenZipPPMdCompressionSettings

Inheritance: java.lang.Object, com.aspose.zip.SevenZipCompressionSettings

public final class SevenZipPPMdCompressionSettings extends SevenZipCompressionSettings

Settings for PPMd compression method within 7z archive.

Constructors

ConstructorDescription
SevenZipPPMdCompressionSettings(int maxOrder, int suballocatorSize)Instantiates settings for PPMd compression method within 7z archive.
SevenZipPPMdCompressionSettings()Instantiates settings for PPMd compression method within 7z archive with default model order and sub-allocator size.

Methods

MethodDescription
getMaxOrder()Gets the maximum order.
getMethod()Gets compression or decompression method.
getSuballocatorSize()Gets the sub-allocator size in MB.

SevenZipPPMdCompressionSettings(int maxOrder, int suballocatorSize)

public SevenZipPPMdCompressionSettings(int maxOrder, int suballocatorSize)

Instantiates settings for PPMd compression method within 7z archive.


     try (SevenZipArchive archive = new SevenZipArchive(new SevenZipEntrySettings(new SevenZipPPMdCompressionSettings(4, 32)))) {
         archive.createEntry("data.bin", "data.bin");
         archive.save("zipFile.zip");
     }
 

Parameters:

ParameterTypeDescription
maxOrderintMaximum order.

Bigger model orders almost surely results in better compression and surely more memory and CPU usage. | | suballocatorSize | int | Memory size in MB suballocator may consume.

The PPMd algorithm might need a lot of memory, especially when used on large files and/or used with large model order. If ppmd needs more memory than you give it, the compression will be worse. |

SevenZipPPMdCompressionSettings()

public SevenZipPPMdCompressionSettings()

Instantiates settings for PPMd compression method within 7z archive with default model order and sub-allocator size.


     try (SevenZipArchive archive = new SevenZipArchive(new SevenZipEntrySettings(new SevenZipPPMdCompressionSettings()))) {
         archive.createEntry("data.bin", "data.bin");
         archive.save("sevenZipFile.7z");
     }
 

Default model order is 6 and sub-allocator size is 16MB.

getMaxOrder()

public final byte getMaxOrder()

Gets the maximum order.

Returns: byte - the maximum order

getMethod()

public SevenZipCompressionMethod getMethod()

Gets compression or decompression method.

Returns: SevenZipCompressionMethod - compression or decompression method

getSuballocatorSize()

public final int getSuballocatorSize()

Gets the sub-allocator size in MB.

Returns: int - the sub-allocator size in MB