Initialize() private method

private Initialize ( ZlibCodec strm, CompressionLevel level ) : int
strm ZlibCodec
level CompressionLevel
return int
Example #1
0
 /// <summary>
 /// Initialize the ZlibCodec for deflation operation, using the specified CompressionLevel, 
 /// the specified number of window bits, and the explicit flag governing whether to emit an RFC1950 header byte pair.
 /// </summary>
 /// <param name="level">The compression level for the codec.</param>
 /// <param name="wantRfc1950Header">whether to emit an initial RFC1950 byte pair in the compressed stream.</param>
 /// <param name="bits">the number of window bits to use.  If you don't know what this means, don't use this method.</param>
 /// <returns>Z_OK if all goes well.</returns>
 public int InitializeDeflate(CompressionLevel level, int bits, bool wantRfc1950Header)
 {
     if (istate != null) throw new ZlibException("You may not call InitializeDeflate() after calling InitializeInflate().");
     dstate = new DeflateManager();
     dstate.WantRfc1950HeaderBytes = wantRfc1950Header;
     return dstate.Initialize(this, level, bits);
 }