Class Bzip2CompressionSettings
Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)
Inställningar som behövs för att kompressorn eller dekompressorn ska fungera.
public class Bzip2CompressionSettings : CompressionSettings
Arv
object ← CompressionSettings ← Bzip2CompressionSettings
Arvda Medlemmar
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()
Kommentarer
bzip2 komprimerar filer med hjälp av Burrows-Wheeler blocksorteringsalgoritmen för textkomprimering och Huffman-kodning. Se mer: https://en.wikipedia.org/wiki/Bzip2
Konstruktörer
Bzip2CompressionSettings(int)
Initierar en ny instans av klassen Aspose.Zip.Saving.Bzip2CompressionSettings.
public Bzip2CompressionSettings(int blockSize)
Parametrar
blockSize
int
Blockstorlek i hundratals kilobyte.
Exempel
using (Archive archive = new Archive(new ArchiveEntrySettings(new Bzip2CompressionSettings(1))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save(zipFile);
}
Undantag
Blockstorleken ligger inte mellan 1 och 9.
Bzip2CompressionSettings()
Initierar en ny instans av klassen Aspose.Zip.Saving.Bzip2CompressionSettings med standardblockstorlek, vilket är 9 hundratals kilobyte.
public Bzip2CompressionSettings()
Exempel
using (Archive archive = new Archive(new ArchiveEntrySettings(new Bzip2CompressionSettings())))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save(zipFile);
}
Egenskaper
BlockSize
Blockstorlek i hundratals kilobyte.
public int BlockSize { get; }