public ZOutputStream(Stream output, ZStream z) : base() { Debug.Assert(output.CanWrite); if (z == null) { z = new ZStream(); } if (z.istate == null && z.dstate == null) { z.inflateInit(); } this.output = output; this.compress = (z.istate == null); this.z = z; }
public ZInputStream(Stream input, ZStream z) : base() { Debug.Assert(input.CanRead); if (z == null) { z = new ZStream(); } if (z.istate == null && z.dstate == null) { z.inflateInit(); } this.input = input; this.compress = (z.istate == null); this.z = z; this.z.next_in = buf; this.z.next_in_index = 0; this.z.avail_in = 0; }
private static ZStream GetDefaultZStream(bool nowrap) { ZStream z = new ZStream(); z.inflateInit(nowrap); return z; }