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;
}