Bzip2SaveOptions.Bzip2SaveOptions

Bzip2SaveOptions(int)

Initierar en ny instans avBzip2SaveOptions class.

public Bzip2SaveOptions(int blockSize)
ParameterTypBeskrivning
blockSizeInt32Blockstorlek i hundratals kilobyte.

Undantag

undantagskick
ArgumentOutOfRangeExceptionBlockstorleken är inte i giltigt intervall.

Exempel

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

Se även


Bzip2SaveOptions()

Initierar en ny instans avBzip2SaveOptions klass med standardblockstorlek, lika med 9 hundra kilobyte.

public Bzip2SaveOptions()

Exempel

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

Se även