internal int DeflateInit(int level, int bits, bool nowrap) { dstate = new Deflate(this); return(dstate.DeflateInit(level, nowrap ? -bits : bits)); }
internal int DeflateInit(int level, int bits, int memlevel) { dstate = new Deflate(this); return(dstate.DeflateInit(level, bits, memlevel)); }
/// <summary> /// Initializes the internal stream state for compression. /// </summary> /// <param name="level">An integer value from 0 to 9 indicating the desired compression level.</param> /// <param name="bits"> The windowBits parameter is the base two logarithm of the window size (the size of the history buffer). It should be in the /// range 8..15 for this version of the library. Larger values of this parameter result in better compression at the expense of memory usage. /// The default value is 15 if DeflateInit is used instead.</param> /// <returns> /// DeflateInit returns <see cref="ZLibResultCode.Z_OK" /> if success, <see cref="ZLibResultCode.Z_MEM_ERROR" /> if there was not enough memory, /// <see cref="ZLibResultCode.Z_STREAM_ERROR" /> if level is not a valid compression level. <see cref="msg" /> is set to <c>null</c> if there /// is no error message. <see cref="DeflateInit(int,int)" /> does not perform any compression: this will be done by <see cref="deflate" />. /// </returns> public int DeflateInit(int level, int bits) { _dstate = new Deflate(); return(_dstate.DeflateInit(this, level, bits)); }
public int Init(int level, int bits, bool nowrap) { finished = false; dstate = new Deflate(this); return(dstate.DeflateInit(level, nowrap ? -bits : bits)); }
public int Init(int level, int bits, int memlevel) { finished = false; dstate = new Deflate(this); return(dstate.DeflateInit(level, bits, memlevel)); }
public int DeflateInit(int level, int bits, bool nowrap) { Dstate = new Deflate(); return(Dstate.DeflateInit(this, level, nowrap ? -bits : bits)); }