Class PPMdCompressionSettings
Tên không gian: Aspose.Zip.Saving Tổng hợp: Aspose.Zip.dll (25.5.0)
Cài đặt cần thiết cho máy nén hoặc máy nén để làm việc.
public class PPMdCompressionSettings : CompressionSettings
Inheritance
object ← CompressionSettings ← PPMdCompressionSettings
Thành viên thừa kế
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
PPMd là một thuật toán nén dữ liệu được phát triển bởi Dmitry Shkarin.Tính toán này dựa trên cụm từ dự đoán phù hợp với nhiều bối cảnh lệnh.
Constructors
Cài đặt PPMdCompressionSettings(int, int)
Bắt đầu một trường hợp mới của lớp Aspose.Zip.Saving.PPMdCompressionSettings.
public PPMdCompressionSettings(int modelOrder, int suballocatorSize)
Parameters
modelOrder
int
lệnh của mô hình.
suballocatorSize
int
Kích thước bộ nhớ trong MB suballocator có thể tiêu thụ.
Examples
using (Archive archive = new Archive(new ArchiveEntrySettings(new PPMdCompressionSettings(4, 10))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save(zipFile);
}
Remarks
Các đơn đặt hàng mô hình lớn hơn gần như chắc chắn dẫn đến nén tốt hơn và chắc chắn sử dụng bộ nhớ và CPU nhiều hơn.
Các thuật toán PPMd có thể cần rất nhiều bộ nhớ, đặc biệt là khi được sử dụng trên các tập tin lớn và/hoặc được sử dụng với thứ tự mô hình lớn. nếu ppmd cần nhiều bộ nhớ hơn bạn cho nó, sự phức tạp sẽ tồi tệ hơn.
Exceptions
modelOrder’ is not between 2 and 16. - or -
suballocatorSize’ is not between 1 and 256.
Cài đặt PPMdCompressionSettings()
Bắt đầu một trường hợp mới của lớp Aspose.Zip.Saving.PPMdCompressionSettings với lệnh mô hình mặc định và kích thước phân bổ.
public PPMdCompressionSettings()
Examples
using (Archive archive = new Archive(new ArchiveEntrySettings(new PPMdCompressionSettings())))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save(zipFile);
}
Remarks
Lệnh mô hình mặc định là 8, và kích thước phân phối phụ là 50MB.
Properties
ModelOrder
Nhận được lệnh của mô hình.
public int ModelOrder { get; }
Giá trị bất động sản
SuballocatorSize
Nhận kích thước sub-allocator trong MB.
public int SuballocatorSize { get; }