PPMdCompressionSettings

PPMdCompressionSettings constructor (1 of 2)

Initializes a new instance of the PPMdCompressionSettings class.

public PPMdCompressionSettings(int modelOrder, int suballocatorSize)
ParameterTypeDescription
modelOrderInt32Order of the model.
suballocatorSizeInt32Memory size in MB suballocator may consume.

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionmodelOrder is not between 2 and 16. - or - suballocatorSize is not between 1 and 256.

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 (Archive archive = new Archive(new ArchiveEntrySettings(new PPMdCompressionSettings(4, 10))))
{
    archive.CreateEntry("data.bin", "data.bin");                   
    archive.Save(zipFile);
}

See Also


PPMdCompressionSettings constructor (2 of 2)

Initializes a new instance of the PPMdCompressionSettings class with default model order and sub-allocator size.

public PPMdCompressionSettings()

Remarks

Default model order is 8 and sub-allocator size is 50MB.

Examples

using (Archive archive = new Archive(new ArchiveEntrySettings(new PPMdCompressionSettings())))
{
    archive.CreateEntry("data.bin", "data.bin");                   
    archive.Save(zipFile);
}

See Also