Initialize() private method

private Initialize ( ZlibCodec codec, CompressionLevel level ) : int
codec ZlibCodec
level CompressionLevel
return int
コード例 #1
0
ファイル: ZlibCodec.cs プロジェクト: KUN-NT/ToolCode
        private int _InternalInitializeDeflate(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, this.CompressLevel, this.WindowBits, this.Strategy);
        }
コード例 #2
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));
 }
コード例 #3
0
ファイル: ZlibCodec.cs プロジェクト: Erikai/OpenORPG
        private int _InternalInitializeDeflate(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, this.CompressLevel, this.WindowBits, this.Strategy);
        }