SevenZipPPMdCompressionSettings

SevenZipPPMdCompressionSettings constructor (1 of 2)

Instantiates settings for PPMd compression method within 7z archive.

public SevenZipPPMdCompressionSettings(byte maxOrder, int suballocatorSize)
ParameterTypeDescription
maxOrderByteMaximum order.
suballocatorSizeInt32Memory size in MB suballocator may consume.

Exceptions

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

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.

Examples

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

See Also


SevenZipPPMdCompressionSettings constructor (2 of 2)

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

public SevenZipPPMdCompressionSettings()

Remarks

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

Examples

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

See Also