Class Bzip2CompressionSettings

Class Bzip2CompressionSettings

Namn på plats: Aspose.Zip.Saving Sammanfattning: Aspose.Zip.dll (25.5.0)

Inställningar som behövs för kompressorn eller dekompressorn att fungera.

public class Bzip2CompressionSettings : CompressionSettings

Inheritance

object CompressionSettings Bzip2CompressionSettings

Arvsmedlemmar

CompressionSettings.Bzip2 , CompressionSettings.Deflate , CompressionSettings.EnhancedDeflate , CompressionSettings.Store , CompressionSettings.Lzma , CompressionSettings.Xz , CompressionSettings.PPMd , CompressionSettings.Zstd , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Remarks

bzip2 komprimerar filer med hjälp av Burrows-Wheeler block sortering text komprimering algoritm, och Huffman kodning. Se mer: https://en.wikipedia.org/wiki/Bzip2

Constructors

Bzip2CompressionSettings(int)

Initialiserar en ny instans av Aspose.Zip.Saving.Bzip2CompressionSettings klass.

public Bzip2CompressionSettings(int blockSize)

Parameters

blockSize int

Blockstorlek i hundratals kilobytar.

Examples

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

Exceptions

ArgumentOutOfRangeException

Blockstorleken är inte mellan 1 och 9.

Bzip2CompressionSettings()

Initialiserar en ny instans av Aspose.Zip.Saving.Bzip2CompressionSettings klass med standardblockstorlek, motsvarande 9 hundra kilobytar.

public Bzip2CompressionSettings()

Examples

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

Properties

BlockSize

Blockstorlek i hundratals kilobytar.

public int BlockSize { get; }

Fastighetsvärde

int

 Svenska