Lines Matching refs:Z
130 …if (Z_OK != deflateInit2(&ctx->Z, ZLIBG(output_compression_level), Z_DEFLATED, ZLIBG(compression_c… in php_zlib_output_handler_ex()
137 deflateEnd(&ctx->Z); in php_zlib_output_handler_ex()
144 …if (Z_OK != deflateInit2(&ctx->Z, ZLIBG(output_compression_level), Z_DEFLATED, ZLIBG(compression_c… in php_zlib_output_handler_ex()
154 deflateEnd(&ctx->Z); in php_zlib_output_handler_ex()
169 ctx->Z.avail_in = ctx->buffer.used; in php_zlib_output_handler_ex()
170 ctx->Z.next_in = (Bytef *) ctx->buffer.data; in php_zlib_output_handler_ex()
171 ctx->Z.avail_out = output_context->out.size; in php_zlib_output_handler_ex()
172 ctx->Z.next_out = (Bytef *) output_context->out.data; in php_zlib_output_handler_ex()
180 switch (deflate(&ctx->Z, flags)) { in php_zlib_output_handler_ex()
183 deflateEnd(&ctx->Z); in php_zlib_output_handler_ex()
187 if (ctx->Z.avail_in) { in php_zlib_output_handler_ex()
188 … memmove(ctx->buffer.data, ctx->buffer.data + ctx->buffer.used - ctx->Z.avail_in, ctx->Z.avail_in); in php_zlib_output_handler_ex()
190 ctx->buffer.free += ctx->buffer.used - ctx->Z.avail_in; in php_zlib_output_handler_ex()
191 ctx->buffer.used = ctx->Z.avail_in; in php_zlib_output_handler_ex()
192 output_context->out.used = output_context->out.size - ctx->Z.avail_out; in php_zlib_output_handler_ex()
195 deflateEnd(&ctx->Z); in php_zlib_output_handler_ex()
200 deflateEnd(&ctx->Z); in php_zlib_output_handler_ex()
243 deflateEnd(&ctx->Z); in php_zlib_output_handler()
254 deflateEnd(&ctx->Z); in php_zlib_output_handler()
271 ctx->Z.zalloc = php_zlib_alloc; in php_zlib_output_handler_context_init()
272 ctx->Z.zfree = php_zlib_free; in php_zlib_output_handler_context_init()
341 z_stream Z; in php_zlib_encode() local
344 memset(&Z, 0, sizeof(z_stream)); in php_zlib_encode()
345 Z.zalloc = php_zlib_alloc; in php_zlib_encode()
346 Z.zfree = php_zlib_free; in php_zlib_encode()
348 …if (Z_OK == (status = deflateInit2(&Z, level, Z_DEFLATED, encoding, MAX_MEM_LEVEL, Z_DEFAULT_STRAT… in php_zlib_encode()
351 Z.next_in = (Bytef *) in_buf; in php_zlib_encode()
352 Z.next_out = (Bytef *) ZSTR_VAL(out); in php_zlib_encode()
353 Z.avail_in = in_len; in php_zlib_encode()
354 Z.avail_out = ZSTR_LEN(out); in php_zlib_encode()
356 status = deflate(&Z, Z_FINISH); in php_zlib_encode()
357 deflateEnd(&Z); in php_zlib_encode()
361 out = zend_string_truncate(out, Z.total_out, 0); in php_zlib_encode()
375 static inline int php_zlib_inflate_rounds(z_stream *Z, size_t max, char **buf, size_t *len) in php_zlib_inflate_rounds() argument
383 buffer.size = (max && (max < Z->avail_in)) ? max : Z->avail_in; in php_zlib_inflate_rounds()
390 Z->avail_out = buffer.free = buffer.size - buffer.used; in php_zlib_inflate_rounds()
391 Z->next_out = (Bytef *) buffer.data + buffer.used; in php_zlib_inflate_rounds()
393 …vail_out=%7lu\n", round, status, buffer.size, buffer.free, buffer.used, Z->avail_in, Z->avail_out); in php_zlib_inflate_rounds()
395 status = inflate(Z, Z_NO_FLUSH); in php_zlib_inflate_rounds()
397 buffer.used += buffer.free - Z->avail_out; in php_zlib_inflate_rounds()
398 buffer.free = Z->avail_out; in php_zlib_inflate_rounds()
400 …vail_out=%7lu\n", round, status, buffer.size, buffer.free, buffer.used, Z->avail_in, Z->avail_out); in php_zlib_inflate_rounds()
404 } while ((Z_BUF_ERROR == status || (Z_OK == status && Z->avail_in)) && ++round < 100); in php_zlib_inflate_rounds()
427 z_stream Z; in php_zlib_decode() local
429 memset(&Z, 0, sizeof(z_stream)); in php_zlib_decode()
430 Z.zalloc = php_zlib_alloc; in php_zlib_decode()
431 Z.zfree = php_zlib_free; in php_zlib_decode()
435 status = inflateInit2(&Z, encoding); in php_zlib_decode()
437 Z.next_in = (Bytef *) in_buf; in php_zlib_decode()
438 Z.avail_in = in_len + 1; /* NOTE: data must be zero terminated */ in php_zlib_decode()
440 switch (status = php_zlib_inflate_rounds(&Z, max_len, out_buf, out_len)) { in php_zlib_decode()
442 inflateEnd(&Z); in php_zlib_decode()
448 inflateEnd(&Z); in php_zlib_decode()
453 inflateEnd(&Z); in php_zlib_decode()
469 deflateEnd(&(ZLIBG(ob_gzhandler)->Z)); in php_zlib_cleanup_ob_gzhandler_mess()