Class SevenZipPPMdCompressionSettings

Class SevenZipPPMdCompressionSettings

Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.2.0)

Settings needed for 7z compressor or decompressor to work.

public sealed class SevenZipPPMdCompressionSettings : SevenZipCompressionSettings

Inheritance

objectSevenZipCompressionSettingsSevenZipPPMdCompressionSettings

Inherited Members

SevenZipCompressionSettings.Method, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

SevenZipPPMdCompressionSettings(byte, int)

Instantiates settings for PPMd compression method within 7z archive.

public SevenZipPPMdCompressionSettings(byte maxOrder, int suballocatorSize)

Parameters

maxOrder byte

Maximum order.

suballocatorSize int

Memory size in MB suballocator may consume.

Examples

using (SevenZipArchive archive = new SevenZipArchive(new SevenZipEntrySettings(new SevenZipPPMdCompressionSettings(4, 32))))
{
    archive.CreateEntry("data.bin", "data.bin");                        
    archive.Save(sevenZipFile);
 }

Remarks

Bigger model orders almost surely results in better compression and surely more memory and CPU usage.

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.

Exceptions

ArgumentOutOfRangeException

maxOrder is not between 2 and 32, or suballocatorSize is not between 1 and 1024.

SevenZipPPMdCompressionSettings()

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

public SevenZipPPMdCompressionSettings()

Examples

using (SevenZipArchive archive = new SevenZipArchive(new SevenZipEntrySettings(new SevenZipPPMdCompressionSettings())))
{
    archive.CreateEntry("data.bin", "data.bin");                        
    archive.Save(sevenZipFile);
 }

Remarks

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

Properties

MaxOrder

Gets the maximum order.

public byte MaxOrder { get; }

Property Value

byte

Method

Gets compression or decompression method.

public override SevenZipCompressionMethod Method { get; }

Property Value

SevenZipCompressionMethod

SuballocatorSize

Gets the sub-allocator size in MB.

public int SuballocatorSize { get; }

Property Value

int

 English