public void end() { if (z == null) return; if (compress) { z.deflateEnd(); } else { z.inflateEnd(); } z.free(); z = null; }