Class SevenZipLZMA2CompressionSettings
Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)
7z 压缩器或解压缩器工作所需的设置。
public class SevenZipLZMA2CompressionSettings : SevenZipCompressionSettings
继承
object ← SevenZipCompressionSettings ← SevenZipLZMA2CompressionSettings
继承的成员
SevenZipCompressionSettings.Method, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
备注
LZMA2 支持多次运行压缩的 LZMA 数据和未压缩的数据。
了解更多信息: https://en.wikipedia.org/wiki/Lempel–Ziv–Markov_chain_algorithm
构造函数
SevenZipLZMA2CompressionSettings(int)
实例化 7z 压缩档案中的 LZMA2 压缩方法设置。
public SevenZipLZMA2CompressionSettings(int dictionarySize = 16777216)
参数
dictionarySize
int
历史缓冲区的大小,必须在 4096 和 1073741824 之间。
备注
字典越大,压缩比通常越好,但大于未压缩数据的字典会浪费内存。
异常
dictionarySize
太大或太小。
SevenZipLZMA2CompressionSettings(int, int)
实例化 7z 压缩档案中的 LZMA2 压缩方法设置。
public SevenZipLZMA2CompressionSettings(int dictionarySize, int fastBytes = 32)
参数
dictionarySize
int
历史缓冲区的大小,必须在 4096 和 1073741824 之间。
fastBytes
int
控制 LZMA2 压缩器使用的快速字节数。更多的快速字节可以在牺牲压缩速度的情况下提供更好的压缩比。
备注
字典越大,压缩比通常越好,但大于未压缩数据的字典会浪费内存。
异常
dictionarySize
太大或太小,或 fastBytes
太大或太小。
属性
CompressionThreads
获取或设置压缩线程数。如果值大于 1,将使用多线程压缩。
public int CompressionThreads { get; set; }
属性值
备注
请勿将此数字设置为超过 CPU 核心数。
异常
线程数超过 32。
DictionarySize
字典(历史缓冲区)大小指示最近处理的未压缩数据在内存中保留的字节数。
public int DictionarySize { get; }
属性值
备注
字典越大,压缩比通常越好,但大于未压缩数据的字典会浪费内存。
FastBytes
获取控制 LZMA2 压缩器使用的快速字节数。
public int FastBytes { get; }
属性值
Method
获取压缩或解压缩方法。
public override SevenZipCompressionMethod Method { get; }