Class Bzip2CompressionSettings
Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)
Einstellungen, die für den Betrieb des Kompressors oder Dekompressors erforderlich sind.
public class Bzip2CompressionSettings : CompressionSettings
Vererbung
object ← CompressionSettings ← Bzip2CompressionSettings
Vererbte Mitglieder
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()
Bemerkungen
bzip2 komprimiert Dateien mithilfe des Burrows-Wheeler-Blocksortierungsalgorithmus für die Textkompression und Huffman-Codierung. Mehr erfahren: https://de.wikipedia.org/wiki/Bzip2
Konstruktoren
Bzip2CompressionSettings(int)
Initialisiert eine neue Instanz der Klasse Aspose.Zip.Saving.Bzip2CompressionSettings.
public Bzip2CompressionSettings(int blockSize)
Parameter
blockSize
int
Blockgröße in Hunderten von Kilobyte.
Beispiele
using (Archive archive = new Archive(new ArchiveEntrySettings(new Bzip2CompressionSettings(1))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save(zipFile);
}
Ausnahmen
Blockgröße liegt nicht zwischen 1 und 9.
Bzip2CompressionSettings()
Initialisiert eine neue Instanz der Klasse Aspose.Zip.Saving.Bzip2CompressionSettings mit der standardmäßigen Blockgröße, die 9 Hunderten von Kilobyte entspricht.
public Bzip2CompressionSettings()
Beispiele
using (Archive archive = new Archive(new ArchiveEntrySettings(new Bzip2CompressionSettings())))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save(zipFile);
}
Eigenschaften
BlockSize
Blockgröße in Hunderten von Kilobyte.
public int BlockSize { get; }