Class Bzip2CompressionSettings
Navne til: Aspose.Zip.Saving Sammensætning: Aspose.Zip.dll (25.5.0)
Indstillingerne er nødvendige for kompressoren eller dekompressoren til at arbejde.
public class Bzip2CompressionSettings : CompressionSettings
Inheritance
object ← CompressionSettings ← Bzip2CompressionSettings
De arvede medlemmer
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 komprimerer filer ved hjælp af Burrows-Wheeler blok sortering tekst kompression algoritme, og Huffman kodning. Se mere: https://en.wikipedia.org/wiki/Bzip2
Constructors
Bzip2CompressionSettings(Int)
Start en ny instans af Aspose.Zip.Saving.Bzip2CompressionSettings klasse.
public Bzip2CompressionSettings(int blockSize)
Parameters
blockSize
int
Blokstørrelse i hundredvis af kilobytter.
Examples
using (Archive archive = new Archive(new ArchiveEntrySettings(new Bzip2CompressionSettings(1))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save(zipFile);
}
Exceptions
Blokstørrelsen er ikke mellem 1 og 9.
Bzip2CompressionSettings()
Initialiserer en ny instans af Aspose.Zip.Saving.Bzip2CompressionSettings klasse med standardblokkstørrelse, der svarer til 9 hundrede kilobytter.
public Bzip2CompressionSettings()
Examples
using (Archive archive = new Archive(new ArchiveEntrySettings(new Bzip2CompressionSettings())))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save(zipFile);
}
Properties
BlockSize
Blokstørrelse i hundredvis af kilobytter.
public int BlockSize { get; }