/// <summary> /// Dynamically update the compression level and compression strategy. The interpretation of level is as in <see cref="DeflateInit(int)"/>. /// This can be used to switch between compression and straight copy of the input data, or to switch to a different kind of input data /// requiring a different strategy. If the compression level is changed, the input available so far is compressed with the old level /// (and may be flushed); the new level will take effect only at the next call of <see cref="deflate" /> /// </summary> /// <param name="level">An integer value indicating the desired compression level.</param> /// <param name="strategy">A <see cref="FlushStrategy">flush strategy</see> to use.</param> /// <remarks> /// Before the call of <see cref="deflateParams" />, the stream state must be set as for a call of <see cref="deflate" />, since the /// currently available input may have to be compressed and flushed. In particular, <see cref="avail_out" /> must be non-zero. /// </remarks> /// <returns> /// deflateParams returns <see cref="ZLibResultCode.Z_OK" /> if success, <see cref="ZLibResultCode.Z_STREAM_ERROR" /> if the source stream /// state was inconsistent or if a parameter was invalid, <see cref="ZLibResultCode.Z_BUF_ERROR" /> if <see cref="avail_out" /> was zero. /// </returns> public int deflateParams(int level, CompressionStrategy strategy) { if (_dstate == null) { return((int)ZLibResultCode.Z_STREAM_ERROR); } return(_dstate.deflateParams(this, level, strategy)); }
public int deflateParams(int level, int strategy) { if (dstate == null) { return(Z_STREAM_ERROR); } return(dstate.deflateParams(this, level, strategy)); }
public int deflateParams(int level, int strategy) { if (dstate == null) return Z_STREAM_ERROR; return dstate.deflateParams(this, level, strategy); }