Bzip2CompressionSettings

Bzip2CompressionSettings constructor (1 of 2)

Initializes a new instance of the Bzip2CompressionSettings class.

public Bzip2CompressionSettings(int blockSize)
ParameterTypeDescription
blockSizeInt32Block size in hundreds of kilobytes.

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionBlock size is not between 1 and 9.

Examples

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

See Also


Bzip2CompressionSettings constructor (2 of 2)

Initializes a new instance of the Bzip2CompressionSettings class with default block size, equals to 9 hundred of kilobytes.

public Bzip2CompressionSettings()

Examples

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

See Also