示例#1
0
 /// <summary>
 /// Creates a new compressor using the specified compression level.
 /// If 'nowrap' is true then the ZLIB header and checksum fields will
 /// not be used in order to support the compression format used in
 /// both GZIP and PKZIP. </summary>
 /// <param name="level"> the compression level (0-9) </param>
 /// <param name="nowrap"> if true then use GZIP compatible compression </param>
 public Deflater(int level, bool nowrap)
 {
     this.Level_Renamed    = level;
     this.Strategy_Renamed = DEFAULT_STRATEGY;
     this.ZsRef            = new ZStreamRef(init(level, DEFAULT_STRATEGY, nowrap));
 }
示例#2
0
 /// <summary>
 /// Creates a new decompressor. If the parameter 'nowrap' is true then
 /// the ZLIB header and checksum fields will not be used. This provides
 /// compatibility with the compression format used by both GZIP and PKZIP.
 /// <para>
 /// Note: When using the 'nowrap' option it is also necessary to provide
 /// an extra "dummy" byte as input. This is required by the ZLIB native
 /// library in order to support certain optimizations.
 ///
 /// </para>
 /// </summary>
 /// <param name="nowrap"> if true then support GZIP compatible compression </param>
 public Inflater(bool nowrap)
 {
     ZsRef = new ZStreamRef(init(nowrap));
 }