1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #ifndef PHP_BZ2_H
22 #define PHP_BZ2_H
23
24 #if HAVE_BZ2
25
26 extern zend_module_entry bz2_module_entry;
27 #define phpext_bz2_ptr &bz2_module_entry
28
29
30 #include <bzlib.h>
31
32 #else
33 #define phpext_bz2_ptr NULL
34 #endif
35
36 #ifdef PHP_WIN32
37 # ifdef PHP_BZ2_EXPORTS
38 # define PHP_BZ2_API __declspec(dllexport)
39 # elif defined(COMPILE_DL_BZ2)
40 # define PHP_BZ2_API __declspec(dllimport)
41 # else
42 # define PHP_BZ2_API
43 # endif
44 #elif defined(__GNUC__) && __GNUC__ >= 4
45 # define PHP_BZ2_API __attribute__ ((visibility("default")))
46 #else
47 # define PHP_BZ2_API
48 #endif
49
50 #include "php_version.h"
51 #define PHP_BZ2_VERSION PHP_VERSION
52
53 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);
54 PHP_BZ2_API php_stream *_php_stream_bz2open_from_BZFILE(BZFILE *bz, const char *mode, php_stream *innerstream STREAMS_DC);
55
56 #define php_stream_bz2open_from_BZFILE(bz, mode, innerstream) _php_stream_bz2open_from_BZFILE((bz), (mode), (innerstream) STREAMS_CC)
57 #define php_stream_bz2open(wrapper, path, mode, options, opened_path) _php_stream_bz2open((wrapper), (path), (mode), (options), (opened_path), NULL STREAMS_CC)
58
59 extern php_stream_filter_factory php_bz2_filter_factory;
60 extern php_stream_ops php_stream_bz2io_ops;
61 #define PHP_STREAM_IS_BZIP2 &php_stream_bz2io_ops
62
63
64 #define PHP_BZ2_FILTER_DEFAULT_BLOCKSIZE 4
65
66
67 #define PHP_BZ2_FILTER_DEFAULT_WORKFACTOR 0
68
69 #endif
70
71
72
73
74
75
76
77