Пример #1
0
 public LzmaCompressionStream(Stream baseStream, LzmaOptions options, bool leaveOpen)
     : base(baseStream, leaveOpen)
 {
     Options      = options ?? LzmaOptions.Default;
     bufferStream = new MemoryStream(DefaultBufferCapacity);
     encoder      = new Encoder();
     encoder.SetCoderProperties(
         new CoderPropID[] {
         CoderPropID.DictionarySize,
         CoderPropID.PosStateBits,
         CoderPropID.LitContextBits,
         CoderPropID.LitPosBits,
         CoderPropID.Algorithm,
         CoderPropID.NumFastBytes,
         CoderPropID.MatchFinder,
         CoderPropID.EndMarker
     },
         new object[] {
         Options.DictionarySize,
         Options.PosStateBits,
         Options.LiteralContextBits,
         Options.LiteralPosBits,
         Options.AlgorithmVersion,
         Options.NumFastBytes,
         Options.MatchFinder.GetName(),
         false
     });
 }
Пример #2
0
 public LzmaCompressionStream(Stream baseStream, LzmaOptions options)
     : this(baseStream, options, false)
 {
 }