System.util.zlib.Inflate.inflateInit C# (CSharp) Method

inflateInit() private method

private inflateInit ( ZStream z, int w ) : int
z ZStream
w int
return int
        internal int inflateInit(ZStream z, int w)
        {
            z.msg = null;
            blocks = null;

            // handle undocumented nowrap option (no zlib header or check)
            nowrap = 0;
            if(w < 0){
                w = - w;
                nowrap = 1;
            }

            // set window size
            if(w<8 ||w>15){
                inflateEnd(z);
                return Z_STREAM_ERROR;
            }
            wbits=w;

            z.istate.blocks=new InfBlocks(z,
                z.istate.nowrap!=0 ? null : this,
                1<<w);

            // reset state
            inflateReset(z);
            return Z_OK;
        }

Usage Example

Esempio n. 1
0
 public int inflateInit(int w, bool nowrap){
     istate=new Inflate();
     return istate.inflateInit(this, nowrap?-w:w);
 }
All Usage Examples Of System.util.zlib.Inflate::inflateInit