Class XzArchiveSettings

Class XzArchiveSettings

Tên không gian: Aspose.Zip.Xz.Settings Tổng hợp: Aspose.Zip.dll (25.5.0)

Khóa học chứa một tập hợp các thiết lập cụ thể xz lưu trữ.

public class XzArchiveSettings

Inheritance

object XzArchiveSettings

Thành viên thừa kế

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

XzArchiveSettings()

Bắt đầu một trường hợp mới của lớp Aspose.Zip.Xz.Settings.XzArchiveSettings bằng cách sử dụng đơn LZMA2 nén.

public XzArchiveSettings()

Remarks

Từ điển mặc định trong bộ lọc LZMA2 kích thước tương đương với 16 megabytes, kích cỡ chênh lệch tương ứng với 64 megabyte, một loại checksum giả định là CRC32.

XzArchiveSettings(XzFilterSettings[ ], dài, XzCheckType)

Bắt đầu một trường hợp mới của lớp Aspose.Zip.Xz.Settings.XzArchiveSettings với các thông số tùy chỉnh.

public XzArchiveSettings(XzFilterSettings[] filters, long blockSize, XzCheckType checkType)

Parameters

filters XzFilterSettings [ ]

Filters (compressors) to be sequentially applied to create Aspose.Zip.Xz.XzArchive. Nó có thể là cả một Aspose.Zip.Xz.Settings.XzLZMA2FilterSettingshoặc cặp Aspose.Zip.Xz.Settings.XzBcjX86FilterSettings và Aspose.Zip.Xz.Settings.XzLZMA2FilterSettings

blockSize long

Kích thước xz file block.

checkType XzCheckType

Loại tính toán thanh toán cho dữ liệu không nén.

Examples

using (FileStream xzFile = File.Open("archive.xz", FileMode.Create))
{
    XzLZMA2FilterSettings filter = new XzLZMA2FilterSettings(5242880);
    XzArchiveSettings settings = new XzArchiveSettings(new XzFilterSettings[] {filter}, 10485760, XzCheckType.Crc32);
    using (var archive = new XzArchive(settings))
    {
        archive.SetSource("data.bin");
        archive.Save(xzFile);
     }
}

Exceptions

ArgumentOutOfRangeException

blockSize’ is negative.

ArgumentNullException

filters’ is null

ArgumentException

filters’ has less than one or more than two filters, or last filter is not Aspose.Zip.Xz.Settings.XzLZMA2FilterSettings.

Properties

CompressionThreads

Nhận hoặc đặt con số dây nén.Nếu giá trị lớn hơn 1, sẽ được sử dụng nhiều lớp nèn.

public int CompressionThreads { get; set; }

Giá trị bất động sản

int

Remarks

Đừng đặt số này nhiều hơn CPU core.

Exceptions

ArgumentOutOfRangeException

Số lượng dây là hơn 100.

FastSpeed

Nhận ví dụ về lớp Aspose.Zip.Xz.Settings.XzArchiveSettingsvới kích thước từ điển bằng 1 megabyte trong bộ lọc LZMA2, kích thước khối bằng 4 megabyte và CRC32 checksum.

public static XzArchiveSettings FastSpeed { get; }

Giá trị bất động sản

XzArchiveSettings

FastestSpeed

Nhận ví dụ về lớp Aspose.Zip.Xz.Settings.XzArchiveSettingsvới kích thước từ điển tương đương với 65536 byte trong bộ lọc LZMA2, kích thước khối tương đương với 1 megabyte và CRC32 checksum.

public static XzArchiveSettings FastestSpeed { get; }

Giá trị bất động sản

XzArchiveSettings

HighCompression

Nhận ví dụ về lớp Aspose.Zip.Xz.Settings.XzArchiveSettingsvới kích thước từ điển tương đương với 32 megabytes trong bộ lọc LZMA2, kích thước khối tương đương với 128 megabytes và CRC32 checksum.

public static XzArchiveSettings HighCompression { get; }

Giá trị bất động sản

XzArchiveSettings

MaximumCompression

Nhận ví dụ về lớp Aspose.Zip.Xz.Settings.XzArchiveSettingsvới kích thước từ điển tương đương với 64 megabytes trong bộ lọc LZMA2, kích thước khối tương đương với 256 megabytes và CRC32 checksum.

public static XzArchiveSettings MaximumCompression { get; }

Giá trị bất động sản

XzArchiveSettings

Normal

Nhận ví dụ về lớp Aspose.Zip.Xz.Settings.XzArchiveSettingsvới kích thước từ điển bằng 16 megabytes trong bộ lọc LZMA2, kích thước khối bằng 64 megabytes và CRC32 checksum.

public static XzArchiveSettings Normal { get; }

Giá trị bất động sản

XzArchiveSettings

 Tiếng Việt