Back to index

php5  5.3.10
php_zlib.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca>                       |
00016    |          Stefan Röhrich <sr@linux.de>                                |
00017    +----------------------------------------------------------------------+
00018 */
00019 
00020 /* $Id: php_zlib.h 321634 2012-01-01 13:15:04Z felipe $ */
00021 
00022 #ifndef PHP_ZLIB_H
00023 #define PHP_ZLIB_H
00024 
00025 #include <zlib.h>
00026 
00027 ZEND_BEGIN_MODULE_GLOBALS(zlib)
00028        /* variables for transparent gzip encoding */
00029        int compression_coding;
00030        z_stream stream;
00031        uLong crc;
00032        int ob_gzhandler_status;
00033        long output_compression;
00034        long output_compression_level;
00035        char *output_handler;
00036 ZEND_END_MODULE_GLOBALS(zlib)
00037 
00038 PHPAPI ZEND_EXTERN_MODULE_GLOBALS(zlib)
00039 
00040 extern php_stream_filter_factory php_zlib_filter_factory;
00041 extern zend_module_entry php_zlib_module_entry;
00042 #define zlib_module_ptr &php_zlib_module_entry
00043 
00044 int php_ob_gzhandler_check(TSRMLS_D);
00045 
00046 php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC);
00047 extern php_stream_wrapper php_stream_gzip_wrapper;
00048 
00049 #ifdef ZTS
00050 #define ZLIBG(v) TSRMG(zlib_globals_id, zend_zlib_globals *, v)
00051 #else
00052 #define ZLIBG(v) (zlib_globals.v)
00053 #endif
00054 
00055 #define phpext_zlib_ptr zlib_module_ptr
00056 
00057 #define CODING_GZIP         1
00058 #define CODING_DEFLATE      2
00059 
00060 #endif /* PHP_ZLIB_H */
00061 
00062 /*
00063  * Local variables:
00064  * tab-width: 4
00065  * c-basic-offset: 4
00066  * indent-tabs-mode: t
00067  * End:
00068  */