xref: /php-src/ext/zlib/zlib.stub.php (revision ce058273)
1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @var int
7 * @cvalue PHP_ZLIB_ENCODING_GZIP
8 */
9const FORCE_GZIP = UNKNOWN;
10/**
11 * @var int
12 * @cvalue PHP_ZLIB_ENCODING_DEFLATE
13 */
14const FORCE_DEFLATE = UNKNOWN;
15
16/**
17 * @var int
18 * @cvalue PHP_ZLIB_ENCODING_RAW
19 */
20const ZLIB_ENCODING_RAW = UNKNOWN;
21/**
22 * @var int
23 * @cvalue PHP_ZLIB_ENCODING_GZIP
24 */
25const ZLIB_ENCODING_GZIP = UNKNOWN;
26/**
27 * @var int
28 * @cvalue PHP_ZLIB_ENCODING_DEFLATE
29 */
30const ZLIB_ENCODING_DEFLATE = UNKNOWN;
31
32/**
33 * @var int
34 * @cvalue Z_NO_FLUSH
35 */
36const ZLIB_NO_FLUSH = UNKNOWN;
37/**
38 * @var int
39 * @cvalue Z_PARTIAL_FLUSH
40 */
41const ZLIB_PARTIAL_FLUSH = UNKNOWN;
42/**
43 * @var int
44 * @cvalue Z_SYNC_FLUSH
45 */
46const ZLIB_SYNC_FLUSH = UNKNOWN;
47/**
48 * @var int
49 * @cvalue Z_FULL_FLUSH
50 */
51const ZLIB_FULL_FLUSH = UNKNOWN;
52/**
53 * @var int
54 * @cvalue Z_BLOCK
55 */
56const ZLIB_BLOCK = UNKNOWN;
57/**
58 * @var int
59 * @cvalue Z_FINISH
60 */
61const ZLIB_FINISH = UNKNOWN;
62
63/**
64 * @var int
65 * @cvalue Z_FILTERED
66 */
67const ZLIB_FILTERED = UNKNOWN;
68/**
69 * @var int
70 * @cvalue Z_HUFFMAN_ONLY
71 */
72const ZLIB_HUFFMAN_ONLY = UNKNOWN;
73/**
74 * @var int
75 * @cvalue Z_RLE
76 */
77const ZLIB_RLE = UNKNOWN;
78/**
79 * @var int
80 * @cvalue Z_FIXED
81 */
82const ZLIB_FIXED = UNKNOWN;
83/**
84 * @var int
85 * @cvalue Z_DEFAULT_STRATEGY
86 */
87const ZLIB_DEFAULT_STRATEGY = UNKNOWN;
88
89/**
90 * @var string
91 * @cvalue ZLIB_VERSION
92 */
93const ZLIB_VERSION = UNKNOWN;
94/**
95 * @var int
96 * @cvalue ZLIB_VERNUM
97 */
98const ZLIB_VERNUM = UNKNOWN;
99
100/**
101 * @var int
102 * @cvalue Z_OK
103 */
104const ZLIB_OK = UNKNOWN;
105/**
106 * @var int
107 * @cvalue Z_STREAM_END
108 */
109const ZLIB_STREAM_END = UNKNOWN;
110/**
111 * @var int
112 * @cvalue Z_NEED_DICT
113 */
114const ZLIB_NEED_DICT = UNKNOWN;
115/**
116 * @var int
117 * @cvalue Z_ERRNO
118 */
119const ZLIB_ERRNO = UNKNOWN;
120/**
121 * @var int
122 * @cvalue Z_STREAM_ERROR
123 */
124const ZLIB_STREAM_ERROR = UNKNOWN;
125/**
126 * @var int
127 * @cvalue Z_DATA_ERROR
128 */
129const ZLIB_DATA_ERROR = UNKNOWN;
130/**
131 * @var int
132 * @cvalue Z_MEM_ERROR
133 */
134const ZLIB_MEM_ERROR = UNKNOWN;
135/**
136 * @var int
137 * @cvalue Z_BUF_ERROR
138 */
139const ZLIB_BUF_ERROR = UNKNOWN;
140/**
141 * @var int
142 * @cvalue Z_VERSION_ERROR
143 */
144const ZLIB_VERSION_ERROR = UNKNOWN;
145
146/**
147 * @strict-properties
148 * @not-serializable
149 */
150final class InflateContext
151{
152}
153
154/**
155 * @strict-properties
156 * @not-serializable
157 */
158final class DeflateContext
159{
160}
161
162/** @refcount 1 */
163function ob_gzhandler(string $data, int $flags): string|false {}
164
165/** @refcount 1 */
166function zlib_get_coding_type(): string|false {}
167
168/**
169 * @return array<int, string>|false
170 * @refcount 1
171 */
172function gzfile(string $filename, int $use_include_path = 0): array|false {}
173
174/**
175 * @return resource|false
176 * @refcount 1
177 */
178function gzopen(string $filename, string $mode, int $use_include_path = 0) {}
179
180function readgzfile(string $filename, int $use_include_path = 0): int|false {}
181
182/** @refcount 1 */
183function zlib_encode(string $data, int $encoding, int $level = -1): string|false {}
184
185/** @refcount 1 */
186function zlib_decode(string $data, int $max_length = 0): string|false {}
187
188/** @refcount 1 */
189function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_RAW): string|false {}
190
191/** @refcount 1 */
192function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_GZIP): string|false {}
193
194/** @refcount 1 */
195function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_DEFLATE): string|false {}
196
197/** @refcount 1 */
198function gzinflate(string $data, int $max_length = 0): string|false {}
199
200/** @refcount 1 */
201function gzdecode(string $data, int $max_length = 0): string|false {}
202
203/** @refcount 1 */
204function gzuncompress(string $data, int $max_length = 0): string|false {}
205
206/**
207 * @param resource $stream
208 * @alias fwrite
209 */
210function gzwrite($stream, string $data, ?int $length = null): int|false {}
211
212/**
213 * @param resource $stream
214 * @alias fwrite
215 * @undocumentable gzputs is an alias of gzwrite, but transitive aliases are not yet supported
216 */
217function gzputs($stream, string $data, ?int $length = null): int|false {}
218
219/**
220 * @param resource $stream
221 * @alias rewind
222 */
223function gzrewind($stream): bool {}
224
225/**
226 * @param resource $stream
227 * @alias fclose
228 */
229function gzclose($stream): bool {}
230
231/**
232 * @param resource $stream
233 * @alias feof
234 */
235function gzeof($stream): bool {}
236
237/**
238 * @param resource $stream
239 * @alias fgetc
240 */
241function gzgetc($stream): string|false {}
242
243/**
244 * @param resource $stream
245 * @alias fpassthru
246 */
247function gzpassthru($stream): int {}
248
249/**
250 * @param resource $stream
251 * @alias fseek
252 */
253function gzseek($stream, int $offset, int $whence = SEEK_SET): int {}
254
255/**
256 * @param resource $stream
257 * @alias ftell
258 */
259function gztell($stream): int|false {}
260
261/**
262 * @param resource $stream
263 * @alias fread
264 */
265function gzread($stream, int $length): string|false {}
266
267/**
268 * @param resource $stream
269 * @alias fgets
270 */
271function gzgets($stream, ?int $length = null): string|false {}
272
273function deflate_init(int $encoding, array $options = []): DeflateContext|false {}
274
275function deflate_add(DeflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false {}
276
277function inflate_init(int $encoding, array $options = []): InflateContext|false {}
278
279function inflate_add(InflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false {}
280
281function inflate_get_status(InflateContext $context): int {}
282
283function inflate_get_read_len(InflateContext $context): int {}
284