php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_bz2.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 | Author: Sterling Hughes <sterling@php.net> |
14 +----------------------------------------------------------------------+
15*/
16
17#ifndef PHP_BZ2_H
18#define PHP_BZ2_H
19
20#ifdef HAVE_BZ2
21
22extern zend_module_entry bz2_module_entry;
23#define phpext_bz2_ptr &bz2_module_entry
24
25/* Bzip2 includes */
26#include <bzlib.h>
27
28#else
29#define phpext_bz2_ptr NULL
30#endif
31
32#ifdef PHP_WIN32
33# ifdef PHP_BZ2_EXPORTS
34# define PHP_BZ2_API __declspec(dllexport)
35# elif defined(COMPILE_DL_BZ2)
36# define PHP_BZ2_API __declspec(dllimport)
37# else
38# define PHP_BZ2_API /* nothing special */
39# endif
40#elif defined(__GNUC__) && __GNUC__ >= 4
41# define PHP_BZ2_API __attribute__ ((visibility("default")))
42#else
43# define PHP_BZ2_API
44#endif
45
46#include "php_version.h"
47#define PHP_BZ2_VERSION PHP_VERSION
48
51
52#define php_stream_bz2open_from_BZFILE(bz, mode, innerstream) _php_stream_bz2open_from_BZFILE((bz), (mode), (innerstream) STREAMS_CC)
53#define php_stream_bz2open(wrapper, path, mode, options, opened_path) _php_stream_bz2open((wrapper), (path), (mode), (options), (opened_path), NULL STREAMS_CC)
54
57#define PHP_STREAM_IS_BZIP2 &php_stream_bz2io_ops
58
59/* 400kb */
60#define PHP_BZ2_FILTER_DEFAULT_BLOCKSIZE 4
61
62/* BZ2 Internal Default */
63#define PHP_BZ2_FILTER_DEFAULT_WORKFACTOR 0
64
65#endif
const php_stream_filter_factory php_bz2_filter_factory
Definition bz2_filter.c:405
char * mode
#define PHP_BZ2_API
Definition php_bz2.h:43
PHP_BZ2_API php_stream * _php_stream_bz2open_from_BZFILE(BZFILE *bz, const char *mode, php_stream *innerstream STREAMS_DC)
PHP_BZ2_API php_stream * _php_stream_bz2open(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context STREAMS_DC)
const php_stream_ops php_stream_bz2io_ops
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
Definition dce.c:49
struct _zend_string zend_string
struct _zend_module_entry zend_module_entry