Lines Matching refs:zstream
60 z_streamp zstream = &vs->zlib.stream; in vnc_zlib_stop() local
71 if (zstream->opaque != vs) { in vnc_zlib_stop()
75 VNC_DEBUG("VNC: opaque = %p | vs = %p\n", zstream->opaque, vs); in vnc_zlib_stop()
76 zstream->zalloc = vnc_zlib_zalloc; in vnc_zlib_stop()
77 zstream->zfree = vnc_zlib_zfree; in vnc_zlib_stop()
79 err = deflateInit2(zstream, vs->tight->compression, Z_DEFLATED, in vnc_zlib_stop()
89 zstream->opaque = vs; in vnc_zlib_stop()
93 if (deflateParams(zstream, vs->tight->compression, in vnc_zlib_stop()
104 zstream->next_in = vs->zlib.zlib.buffer; in vnc_zlib_stop()
105 zstream->avail_in = vs->zlib.zlib.offset; in vnc_zlib_stop()
106 zstream->next_out = vs->output.buffer + vs->output.offset; in vnc_zlib_stop()
107 zstream->avail_out = vs->output.capacity - vs->output.offset; in vnc_zlib_stop()
108 previous_out = zstream->avail_out; in vnc_zlib_stop()
109 zstream->data_type = Z_BINARY; in vnc_zlib_stop()
112 if (deflate(zstream, Z_SYNC_FLUSH) != Z_OK) { in vnc_zlib_stop()
117 vs->output.offset = vs->output.capacity - zstream->avail_out; in vnc_zlib_stop()
118 return previous_out - zstream->avail_out; in vnc_zlib_stop()