Class Bzip2CompressionSettings

Class Bzip2CompressionSettings

Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)

Cài đặt cần thiết cho bộ nén hoặc bộ giải nén hoạt động.

public class Bzip2CompressionSettings : CompressionSettings

Kế thừa

objectCompressionSettingsBzip2CompressionSettings

Các thành viên kế thừa

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()

Nhận xét

bzip2 nén tệp bằng cách sử dụng thuật toán nén văn bản sắp xếp khối Burrows-Wheeler và mã hóa Huffman. Xem thêm: https://en.wikipedia.org/wiki/Bzip2

Các hàm khởi tạo

Bzip2CompressionSettings(int)

Khởi tạo một thể hiện mới của lớp Aspose.Zip.Saving.Bzip2CompressionSettings.

public Bzip2CompressionSettings(int blockSize)

Tham số

blockSize int

Kích thước khối tính bằng hàng trăm kilobyte.

Ví dụ

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

Ngoại lệ

ArgumentOutOfRangeException

Kích thước khối không nằm trong khoảng từ 1 đến 9.

Bzip2CompressionSettings()

Khởi tạo một thể hiện mới của lớp Aspose.Zip.Saving.Bzip2CompressionSettings với kích thước khối mặc định, bằng 9 trăm kilobyte.

public Bzip2CompressionSettings()

Ví dụ

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

Thuộc tính

BlockSize

Kích thước khối tính bằng hàng trăm kilobyte.

public int BlockSize { get; }

Giá trị thuộc tính

int

 Tiếng Việt