Class Bzip2CompressionSettings

Class Bzip2CompressionSettings

名称: Aspose.Zip.Saving 收藏: Aspose.Zip.dll (25.5.0)

设置需要压缩机或压缩机工作。

public class Bzip2CompressionSettings : CompressionSettings

Inheritance

object CompressionSettings Bzip2CompressionSettings

继承人

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 压缩文件使用 Burrows-Wheeler 区块分文本压缩算法和 Huffman 编码. 查看更多: https://en.wikipedia.org/wiki/Bzip2

Constructors

Bzip2CompressionSettings(因特)

启动 Aspose.Zip.Saving.Bzip2CompressionSettings 类的新例子。

public Bzip2CompressionSettings(int blockSize)

Parameters

blockSize int

区块大小在数百千里。

Examples

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

Exceptions

ArgumentOutOfRangeException

区块大小不在1到9之间。

Bzip2CompressionSettings()

启动一个新的例子 Aspose.Zip.Saving.Bzip2CompressionSettings 类与默认区块大小,相当于 900 千里。

public Bzip2CompressionSettings()

Examples

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

Properties

BlockSize

区块大小在数百千里。

public int BlockSize { get; }

财产价值

int

 中文