Class LzmaArchiveSettings
Class LzmaArchiveSettings
名称: Aspose.Zip.LZMA 收藏: Aspose.Zip.dll (25.5.0)
设置为 lzma 档案。
public class LzmaArchiveSettings
Inheritance
继承人
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Remarks
Lempel-Ziv-Markov 链算法(LZMA)是一种用于实现无损的数据压缩算,使用类似于 LZ77 的词汇压縮方案,具有高压度比例和变量压抑字体大小。
查看更多: https://en.wikipedia.org/wiki/Lempel –Ziv–Markov_chain_algorithm
Constructors
LzmaArchiveSettings()
启动 Aspose.Zip.LZMA.LzmaArchiveSettings 类的新例子,默认字典大小相当于 16 兆比特。
public LzmaArchiveSettings()
Examples
using (LzmaArchive archive = new LzmaArchive(new LzmaArchiveSettings() { DictionarySize = 1048576 })
{
archive.SetSource("data.bin");
archive.Save(lzmaFile);
}
Properties
DictionarySize
字典(历史泡沫)大小表明,最近处理的未压缩数据的数比特存储在记忆中。如果不设置,将根据输入大小选择。
public int DictionarySize { get; set; }
财产价值
Remarks
词典越大,通常压缩比例就越好 - 但比未压縮数据更大的字典是RAM的浪费。
CompressionProgressed
当一份原料流压缩时,它会增加。
public event EventHandler<progresseventargs> CompressionProgressed
事件类型
EventHandler < ProgressEventArgs >
Examples
lzmaArchiveSettings.CompressionProgressed += (s, e) => { int percent = (int)((100 * (long)e.ProceededBytes) / entrySourceStream.Length); };