Bzip2SaveOptions

Bzip2SaveOptions constructor (1 of 2)

Initializes a new instance of the Bzip2SaveOptions class.

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

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionBlock size is not in valid range.

Examples

using (FileStream result = File.Open("archive.bz2"))
{
    using (Bzip2Archive archive = new Bzip2Archive())
    {
        archive.SetSource("data.bin");
        archive.Save(result, new Bzip2SaveOptions(9));
    }
}

See Also


Bzip2SaveOptions constructor (2 of 2)

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

public Bzip2SaveOptions()

Examples

using (FileStream result = File.Open("archive.bz2"))
{
    using (Bzip2Archive archive = new Bzip2Archive())
    {
        archive.SetSource("data.bin");
        archive.Save(result, new Bzip2SaveOptions());
    }
}

See Also