Class PPMdCompressionSettings
- java.lang.Object
-
- com.aspose.zip.CompressionSettings
-
- com.aspose.zip.PPMdCompressionSettings
-
public class PPMdCompressionSettings extends CompressionSettings
Settings for PPMd compression within a ZIP archive.
PPMd is a data compression algorithm developed by Dmitry Shkarin. This algorithm is based on predictive phrase matching on multiple order contexts.
-
-
Constructor Summary
Constructors Constructor Description PPMdCompressionSettings()Initializes a new instance of thePPMdCompressionSettingsclass with default model order and sub-allocator size.PPMdCompressionSettings(int modelOrder, int suballocatorSize)Initializes a new instance of thePPMdCompressionSettingsclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetModelOrder()Gets the order of the model.intgetSuballocatorSize()Gets the sub-allocator size in MB.-
Methods inherited from class com.aspose.zip.CompressionSettings
getBzip2, getDeflate, getEnhancedDeflate, getLzma, getPPMd, getStore, getXz, getZstd
-
-
-
-
Constructor Detail
-
PPMdCompressionSettings
public PPMdCompressionSettings(int modelOrder, int suballocatorSize)Initializes a new instance of the
PPMdCompressionSettingsclass.try (Archive archive = new Archive(new ArchiveEntrySettings(new PPMdCompressionSettings(4, 10)))) { archive.createEntry("data.bin", "data.bin"); archive.save("zipFile.zip"); }- Parameters:
modelOrder- Order of the model.Bigger model orders almost surely results in better compression and surely more memory and CPU usage.
suballocatorSize- 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.
- Throws:
com.aspose.ms.System.ArgumentOutOfRangeException-modelOrderis not between 2 and 16, orsuballocatorSizeis not between 1 and 256.
-
PPMdCompressionSettings
public PPMdCompressionSettings()
Initializes a new instance of the
PPMdCompressionSettingsclass with default model order and sub-allocator size.try (Archive archive = new Archive(new ArchiveEntrySettings(new PPMdCompressionSettings()))) { archive.createEntry("data.bin", "data.bin"); archive.save("zipFile.zip"); }The default model order is 8, and the sub-allocator size is 50MB.
-
-