php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_zlib.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
14 | Stefan R�hrich <sr@linux.de> |
15 | Michael Wallner <mike@php.net> |
16 +----------------------------------------------------------------------+
17*/
18
19#ifndef PHP_ZLIB_H
20#define PHP_ZLIB_H
21
22#include "php_version.h"
23#define PHP_ZLIB_VERSION PHP_VERSION
24
25#include <zlib.h>
26
27#define PHP_ZLIB_ENCODING_RAW -0xf
28#define PHP_ZLIB_ENCODING_GZIP 0x1f
29#define PHP_ZLIB_ENCODING_DEFLATE 0x0f
30
31#define PHP_ZLIB_ENCODING_ANY 0x2f
32
33#define PHP_ZLIB_OUTPUT_HANDLER_NAME "zlib output compression"
34#define PHP_ZLIB_BUFFER_SIZE_GUESS(in_len) (((size_t) ((double) in_len * (double) 1.015)) + 10 + 8 + 4 + 1)
35
36typedef struct _php_zlib_buffer {
37 char *data;
38 char *aptr;
39 size_t used;
40 size_t free;
41 size_t size;
43
52
54 /* variables for transparent gzip encoding */
63
64#define ZLIBG(v) ZEND_MODULE_GLOBALS_ACCESSOR(zlib, v)
65
66php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context STREAMS_DC);
71#define zlib_module_ptr &php_zlib_module_entry
72#define phpext_zlib_ptr zlib_module_ptr
73
74#endif /* PHP_ZLIB_H */
char * mode
PHP_JSON_API size_t int options
Definition php_json.h:102
struct _php_stream_filter_factory php_stream_filter_factory
struct _php_stream php_stream
Definition php_streams.h:96
struct _php_stream_context php_stream_context
Definition php_streams.h:98
#define STREAMS_DC
Definition php_streams.h:53
struct _php_stream_ops php_stream_ops
struct _php_stream_wrapper php_stream_wrapper
Definition php_streams.h:97
const php_stream_ops php_stream_gzio_ops
zend_long output_compression
Definition php_zlib.h:55
const php_stream_filter_factory php_zlib_filter_factory
const php_stream_wrapper php_stream_gzip_wrapper
php_zlib_context * ob_gzhandler
Definition php_zlib.h:58
struct _php_zlib_context php_zlib_context
php_stream * php_stream_gzopen(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context STREAMS_DC)
bool handler_registered
Definition php_zlib.h:60
zend_long output_compression_level
Definition php_zlib.h:56
char * output_handler
Definition php_zlib.h:57
int compression_coding
Definition php_zlib.h:61
zend_module_entry php_zlib_module_entry
Definition zlib.c:1429
struct _php_zlib_buffer php_zlib_buffer
zend_long output_compression_default
Definition php_zlib.h:59
zend_object std
Definition php_zlib.h:50
char * inflateDict
Definition php_zlib.h:46
php_zlib_buffer buffer
Definition php_zlib.h:49
size_t inflateDictlen
Definition php_zlib.h:48
Definition dce.c:49
#define ZEND_END_MODULE_GLOBALS(module_name)
Definition zend_API.h:248
#define ZEND_BEGIN_MODULE_GLOBALS(module_name)
Definition zend_API.h:246
int32_t zend_long
Definition zend_long.h:42
struct _zend_string zend_string
struct _zend_module_entry zend_module_entry
struct _zend_object zend_object