| 1 |
<?php |
| 2 |
|
| 3 |
// Start of zlib v.2.0 |
| 4 |
|
| 5 |
/** |
| 6 |
* Output a gz-file |
| 7 |
* @link http://www.php.net/manual/en/function.readgzfile.php |
| 8 |
* @param filename string <p> |
| 9 |
* The file name. This file will be opened from the filesystem and its |
| 10 |
* contents written to standard output. |
| 11 |
* </p> |
| 12 |
* @param use_include_path int[optional] <p> |
| 13 |
* You can set this optional parameter to 1, if you |
| 14 |
* want to search for the file in the include_path too. |
| 15 |
* </p> |
| 16 |
* @return int the number of (uncompressed) bytes read from the file. If |
| 17 |
* an error occurs, false is returned and unless the function was |
| 18 |
* called as @readgzfile, an error message is |
| 19 |
* printed. |
| 20 |
*/ |
| 21 |
function readgzfile ($filename, $use_include_path = null) {} |
| 22 |
|
| 23 |
/** |
| 24 |
* Rewind the position of a gz-file pointer |
| 25 |
* @link http://www.php.net/manual/en/function.gzrewind.php |
| 26 |
* @param zp resource <p> |
| 27 |
* The gz-file pointer. It must be valid, and must point to a file |
| 28 |
* successfully opened by gzopen. |
| 29 |
* </p> |
| 30 |
* @return bool Returns true on success, false on failure. |
| 31 |
*/ |
| 32 |
function gzrewind ($zp) {} |
| 33 |
|
| 34 |
/** |
| 35 |
* Close an open gz-file pointer |
| 36 |
* @link http://www.php.net/manual/en/function.gzclose.php |
| 37 |
* @param zp resource <p> |
| 38 |
* The gz-file pointer. It must be valid, and must point to a file |
| 39 |
* successfully opened by gzopen. |
| 40 |
* </p> |
| 41 |
* @return bool Returns true on success, false on failure. |
| 42 |
*/ |
| 43 |
function gzclose ($zp) {} |
| 44 |
|
| 45 |
/** |
| 46 |
* Test for <acronym>EOF</acronym> on a gz-file pointer |
| 47 |
* @link http://www.php.net/manual/en/function.gzeof.php |
| 48 |
* @param zp resource <p> |
| 49 |
* The gz-file pointer. It must be valid, and must point to a file |
| 50 |
* successfully opened by gzopen. |
| 51 |
* </p> |
| 52 |
* @return int true if the gz-file pointer is at EOF or an error occurs; |
| 53 |
* otherwise returns false. |
| 54 |
*/ |
| 55 |
function gzeof ($zp) {} |
| 56 |
|
| 57 |
/** |
| 58 |
* Get character from gz-file pointer |
| 59 |
* @link http://www.php.net/manual/en/function.gzgetc.php |
| 60 |
* @param zp resource <p> |
| 61 |
* The gz-file pointer. It must be valid, and must point to a file |
| 62 |
* successfully opened by gzopen. |
| 63 |
* </p> |
| 64 |
* @return string The uncompressed character or false on EOF (unlike gzeof). |
| 65 |
*/ |
| 66 |
function gzgetc ($zp) {} |
| 67 |
|
| 68 |
/** |
| 69 |
* Get line from file pointer |
| 70 |
* @link http://www.php.net/manual/en/function.gzgets.php |
| 71 |
* @param zp resource <p> |
| 72 |
* The gz-file pointer. It must be valid, and must point to a file |
| 73 |
* successfully opened by gzopen. |
| 74 |
* </p> |
| 75 |
* @param length int[optional] <p> |
| 76 |
* The length of data to get. |
| 77 |
* </p> |
| 78 |
* @return string The uncompressed string, or false on error. |
| 79 |
*/ |
| 80 |
function gzgets ($zp, $length = null) {} |
| 81 |
|
| 82 |
/** |
| 83 |
* Get line from gz-file pointer and strip HTML tags |
| 84 |
* @link http://www.php.net/manual/en/function.gzgetss.php |
| 85 |
* @param zp resource <p> |
| 86 |
* The gz-file pointer. It must be valid, and must point to a file |
| 87 |
* successfully opened by gzopen. |
| 88 |
* </p> |
| 89 |
* @param length int <p> |
| 90 |
* The length of data to get. |
| 91 |
* </p> |
| 92 |
* @param allowable_tags string[optional] <p> |
| 93 |
* You can use this optional parameter to specify tags which should not |
| 94 |
* be stripped. |
| 95 |
* </p> |
| 96 |
* @return string The uncompressed and stripped string, or false on error. |
| 97 |
*/ |
| 98 |
function gzgetss ($zp, $length, $allowable_tags = null) {} |
| 99 |
|
| 100 |
/** |
| 101 |
* Binary-safe gz-file read |
| 102 |
* @link http://www.php.net/manual/en/function.gzread.php |
| 103 |
* @param zp resource <p> |
| 104 |
* The gz-file pointer. It must be valid, and must point to a file |
| 105 |
* successfully opened by gzopen. |
| 106 |
* </p> |
| 107 |
* @param length int <p> |
| 108 |
* The number of bytes to read. |
| 109 |
* </p> |
| 110 |
* @return string The data that have been read. |
| 111 |
*/ |
| 112 |
function gzread ($zp, $length) {} |
| 113 |
|
| 114 |
/** |
| 115 |
* Open gz-file |
| 116 |
* @link http://www.php.net/manual/en/function.gzopen.php |
| 117 |
* @param filename string <p> |
| 118 |
* The file name. |
| 119 |
* </p> |
| 120 |
* @param mode string <p> |
| 121 |
* As in fopen (rb or |
| 122 |
* wb) but can also include a compression level |
| 123 |
* (wb9) or a strategy: f for |
| 124 |
* filtered data as in wb6f, h for |
| 125 |
* Huffman only compression as in wb1h. |
| 126 |
* (See the description of deflateInit2 |
| 127 |
* in zlib.h for |
| 128 |
* more information about the strategy parameter.) |
| 129 |
* </p> |
| 130 |
* @param use_include_path int[optional] <p> |
| 131 |
* You can set this optional parameter to 1, if you |
| 132 |
* want to search for the file in the include_path too. |
| 133 |
* </p> |
| 134 |
* @return resource a file pointer to the file opened, after that, everything you read |
| 135 |
* from this file descriptor will be transparently decompressed and what you |
| 136 |
* write gets compressed. |
| 137 |
* </p> |
| 138 |
* <p> |
| 139 |
* If the open fails, the function returns false. |
| 140 |
*/ |
| 141 |
function gzopen ($filename, $mode, $use_include_path = null) {} |
| 142 |
|
| 143 |
/** |
| 144 |
* Output all remaining data on a gz-file pointer |
| 145 |
* @link http://www.php.net/manual/en/function.gzpassthru.php |
| 146 |
* @param zp resource <p> |
| 147 |
* The gz-file pointer. It must be valid, and must point to a file |
| 148 |
* successfully opened by gzopen. |
| 149 |
* </p> |
| 150 |
* @return int The number of uncompressed characters read from gz |
| 151 |
* and passed through to the input, or false on error. |
| 152 |
*/ |
| 153 |
function gzpassthru ($zp) {} |
| 154 |
|
| 155 |
/** |
| 156 |
* Seek on a gz-file pointer |
| 157 |
* @link http://www.php.net/manual/en/function.gzseek.php |
| 158 |
* @param zp resource <p> |
| 159 |
* The gz-file pointer. It must be valid, and must point to a file |
| 160 |
* successfully opened by gzopen. |
| 161 |
* </p> |
| 162 |
* @param offset int <p> |
| 163 |
* The seeked offset. |
| 164 |
* </p> |
| 165 |
* @param whence int[optional] <p> |
| 166 |
* whence values are: |
| 167 |
* |
| 168 |
* SEEK_SET - Set position equal to offset bytes. |
| 169 |
* SEEK_CUR - Set position to current location plus offset. |
| 170 |
* |
| 171 |
* </p> |
| 172 |
* <p> |
| 173 |
* If whence is not specified, it is assumed to be |
| 174 |
* SEEK_SET. |
| 175 |
* </p> |
| 176 |
* @return int Upon success, returns 0; otherwise, returns -1. Note that seeking |
| 177 |
* past EOF is not considered an error. |
| 178 |
*/ |
| 179 |
function gzseek ($zp, $offset, $whence = null) {} |
| 180 |
|
| 181 |
/** |
| 182 |
* Tell gz-file pointer read/write position |
| 183 |
* @link http://www.php.net/manual/en/function.gztell.php |
| 184 |
* @param zp resource <p> |
| 185 |
* The gz-file pointer. It must be valid, and must point to a file |
| 186 |
* successfully opened by gzopen. |
| 187 |
* </p> |
| 188 |
* @return int The position of the file pointer or false if an error occurs. |
| 189 |
*/ |
| 190 |
function gztell ($zp) {} |
| 191 |
|
| 192 |
/** |
| 193 |
* Binary-safe gz-file write |
| 194 |
* @link http://www.php.net/manual/en/function.gzwrite.php |
| 195 |
* @param zp resource <p> |
| 196 |
* The gz-file pointer. It must be valid, and must point to a file |
| 197 |
* successfully opened by gzopen. |
| 198 |
* </p> |
| 199 |
* @param string string <p> |
| 200 |
* The string to write. |
| 201 |
* </p> |
| 202 |
* @param length int[optional] <p> |
| 203 |
* The number of uncompressed bytes to write. If supplied, writing will |
| 204 |
* stop after length (uncompressed) bytes have been |
| 205 |
* written or the end of string is reached, |
| 206 |
* whichever comes first. |
| 207 |
* </p> |
| 208 |
* |
| 209 |
* <p> |
| 210 |
* Note that if the length argument is given, |
| 211 |
* then the magic_quotes_runtime |
| 212 |
* configuration option will be ignored and no slashes will be |
| 213 |
* stripped from string. |
| 214 |
* </p> |
| 215 |
* @return int the number of (uncompressed) bytes written to the given gz-file |
| 216 |
* stream. |
| 217 |
*/ |
| 218 |
function gzwrite ($zp, $string, $length = null) {} |
| 219 |
|
| 220 |
/** |
| 221 |
* &Alias; <function>gzwrite</function> |
| 222 |
* @link http://www.php.net/manual/en/function.gzputs.php |
| 223 |
* @param fp |
| 224 |
* @param str |
| 225 |
* @param length[optional] |
| 226 |
*/ |
| 227 |
function gzputs ($fp, $str, $length) {} |
| 228 |
|
| 229 |
/** |
| 230 |
* Read entire gz-file into an array |
| 231 |
* @link http://www.php.net/manual/en/function.gzfile.php |
| 232 |
* @param filename string <p> |
| 233 |
* The file name. |
| 234 |
* </p> |
| 235 |
* @param use_include_path int[optional] <p> |
| 236 |
* You can set this optional parameter to 1, if you |
| 237 |
* want to search for the file in the include_path too. |
| 238 |
* </p> |
| 239 |
* @return array An array containing the file, one line per cell. |
| 240 |
*/ |
| 241 |
function gzfile ($filename, $use_include_path = null) {} |
| 242 |
|
| 243 |
/** |
| 244 |
* Compress a string |
| 245 |
* @link http://www.php.net/manual/en/function.gzcompress.php |
| 246 |
* @param data string <p> |
| 247 |
* The data to compress. |
| 248 |
* </p> |
| 249 |
* @param level int[optional] <p> |
| 250 |
* The level of compression. Can be given as 0 for no compression up to 9 |
| 251 |
* for maximum compression. |
| 252 |
* </p> |
| 253 |
* <p> |
| 254 |
* If -1 is used, the default compression of the zlib library is used which is 6. |
| 255 |
* </p> |
| 256 |
* @param encoding int[optional] <p> |
| 257 |
* One of ZLIB_ENCODING_* constants. |
| 258 |
* </p> |
| 259 |
* @return string The compressed string or false if an error occurred. |
| 260 |
*/ |
| 261 |
function gzcompress ($data, $level = null, $encoding = null) {} |
| 262 |
|
| 263 |
/** |
| 264 |
* Uncompress a compressed string |
| 265 |
* @link http://www.php.net/manual/en/function.gzuncompress.php |
| 266 |
* @param data string <p> |
| 267 |
* The data compressed by gzcompress. |
| 268 |
* </p> |
| 269 |
* @param length int[optional] <p> |
| 270 |
* The maximum length of data to decode. |
| 271 |
* </p> |
| 272 |
* @return string The original uncompressed data or false on error. |
| 273 |
* </p> |
| 274 |
* <p> |
| 275 |
* The function will return an error if the uncompressed data is more than |
| 276 |
* 32768 times the length of the compressed input data |
| 277 |
* or more than the optional parameter length. |
| 278 |
*/ |
| 279 |
function gzuncompress ($data, $length = null) {} |
| 280 |
|
| 281 |
/** |
| 282 |
* Deflate a string |
| 283 |
* @link http://www.php.net/manual/en/function.gzdeflate.php |
| 284 |
* @param data string <p> |
| 285 |
* The data to deflate. |
| 286 |
* </p> |
| 287 |
* @param level int[optional] <p> |
| 288 |
* The level of compression. Can be given as 0 for no compression up to 9 |
| 289 |
* for maximum compression. If not given, the default compression level will |
| 290 |
* be the default compression level of the zlib library. |
| 291 |
* </p> |
| 292 |
* @param encoding int[optional] <p> |
| 293 |
* One of ZLIB_ENCODING_* constants. |
| 294 |
* </p> |
| 295 |
* @return string The deflated string or false if an error occurred. |
| 296 |
*/ |
| 297 |
function gzdeflate ($data, $level = null, $encoding = null) {} |
| 298 |
|
| 299 |
/** |
| 300 |
* Inflate a deflated string |
| 301 |
* @link http://www.php.net/manual/en/function.gzinflate.php |
| 302 |
* @param data string <p> |
| 303 |
* The data compressed by gzdeflate. |
| 304 |
* </p> |
| 305 |
* @param length int[optional] <p> |
| 306 |
* The maximum length of data to decode. |
| 307 |
* </p> |
| 308 |
* @return string The original uncompressed data or false on error. |
| 309 |
* </p> |
| 310 |
* <p> |
| 311 |
* The function will return an error if the uncompressed data is more than |
| 312 |
* 32768 times the length of the compressed input data |
| 313 |
* or more than the optional parameter length. |
| 314 |
*/ |
| 315 |
function gzinflate ($data, $length = null) {} |
| 316 |
|
| 317 |
/** |
| 318 |
* Create a gzip compressed string |
| 319 |
* @link http://www.php.net/manual/en/function.gzencode.php |
| 320 |
* @param data string <p> |
| 321 |
* The data to encode. |
| 322 |
* </p> |
| 323 |
* @param level int[optional] <p> |
| 324 |
* The level of compression. Can be given as 0 for no compression up to 9 |
| 325 |
* for maximum compression. If not given, the default compression level will |
| 326 |
* be the default compression level of the zlib library. |
| 327 |
* </p> |
| 328 |
* @param encoding_mode int[optional] <p> |
| 329 |
* The encoding mode. Can be FORCE_GZIP (the default) |
| 330 |
* or FORCE_DEFLATE. |
| 331 |
* </p> |
| 332 |
* <p> |
| 333 |
* Prior to PHP 5.4.0, using FORCE_DEFLATE results in |
| 334 |
* a standard zlib deflated string (inclusive zlib headers) after a gzip |
| 335 |
* file header but without the trailing crc32 checksum. |
| 336 |
* </p> |
| 337 |
* <p> |
| 338 |
* In PHP 5.4.0 and later, FORCE_DEFLATE generates |
| 339 |
* RFC 1950 compliant output, consisting of a zlib header, the deflated |
| 340 |
* data, and an Adler checksum. |
| 341 |
* </p> |
| 342 |
* @return string The encoded string, or false if an error occurred. |
| 343 |
*/ |
| 344 |
function gzencode ($data, $level = null, $encoding_mode = null) {} |
| 345 |
|
| 346 |
/** |
| 347 |
* Decodes a gzip compressed string |
| 348 |
* @link http://www.php.net/manual/en/function.gzdecode.php |
| 349 |
* @param data string <p> |
| 350 |
* The data to decode, encoded by gzencode. |
| 351 |
* </p> |
| 352 |
* @param length int[optional] <p> |
| 353 |
* The maximum length of data to decode. |
| 354 |
* </p> |
| 355 |
* @return string The decoded string, or false if an error occurred. |
| 356 |
*/ |
| 357 |
function gzdecode ($data, $length = null) {} |
| 358 |
|
| 359 |
/** |
| 360 |
* Compress data with the specified encoding |
| 361 |
* @link http://www.php.net/manual/en/function.zlib-encode.php |
| 362 |
* @param data string <p> |
| 363 |
* |
| 364 |
* </p> |
| 365 |
* @param encoding string <p> |
| 366 |
* |
| 367 |
* </p> |
| 368 |
* @param level string[optional] <p> |
| 369 |
* |
| 370 |
* </p> |
| 371 |
* @return string |
| 372 |
*/ |
| 373 |
function zlib_encode ($data, $encoding, $level = null) {} |
| 374 |
|
| 375 |
/** |
| 376 |
* Uncompress any raw/gzip/zlib encoded data |
| 377 |
* @link http://www.php.net/manual/en/function.zlib-decode.php |
| 378 |
* @param data string <p> |
| 379 |
* |
| 380 |
* </p> |
| 381 |
* @param max_decoded_len string[optional] <p> |
| 382 |
* |
| 383 |
* </p> |
| 384 |
* @return string |
| 385 |
*/ |
| 386 |
function zlib_decode ($data, $max_decoded_len = null) {} |
| 387 |
|
| 388 |
/** |
| 389 |
* Returns the coding type used for output compression |
| 390 |
* @link http://www.php.net/manual/en/function.zlib-get-coding-type.php |
| 391 |
* @return string Possible return values are gzip, deflate, |
| 392 |
* or false. |
| 393 |
*/ |
| 394 |
function zlib_get_coding_type () {} |
| 395 |
|
| 396 |
/** |
| 397 |
* ob_start callback function to gzip output buffer |
| 398 |
* @link http://www.php.net/manual/en/function.ob-gzhandler.php |
| 399 |
* @param buffer string <p> |
| 400 |
* </p> |
| 401 |
* @param mode int <p> |
| 402 |
* </p> |
| 403 |
* @return string |
| 404 |
*/ |
| 405 |
function ob_gzhandler ($buffer, $mode) {} |
| 406 |
|
| 407 |
define ('FORCE_GZIP', 31); |
| 408 |
define ('FORCE_DEFLATE', 15); |
| 409 |
define ('ZLIB_ENCODING_RAW', -15); |
| 410 |
define ('ZLIB_ENCODING_GZIP', 31); |
| 411 |
define ('ZLIB_ENCODING_DEFLATE', 15); |
| 412 |
|
| 413 |
// End of zlib v.2.0 |
| 414 |
?> |