1 <?hh // decl /* -*- php -*- */
3 * Copyright (c) 2014, Facebook, Inc.
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the "hack" directory of this source tree.
11 const int ZLIB_ENCODING_RAW = 0;
12 const int ZLIB_ENCODING_GZIP = 0;
13 const int ZLIB_ENCODING_DEFLATE = 0;
14 const int ZLIB_ENCODING_ANY = 0;
16 const int FORCE_GZIP = 0;
17 const int FORCE_DEFLATE = 0;
20 function gzclose($zp);
22 function gzcompress(string $data, int $level = -1): mixed;
24 function gzdecode(string $data, int $length = PHP_INT_MAX): mixed;
26 function gzdeflate(string $data, int $level = -1): mixed;
28 function gzencode(string $data, int $level = -1): mixed;
32 function gzfile($filename, $use_include_path = false);
36 function gzgets($zp, $length = 1024);
38 function gzgetss($zp, $length = 0, $allowable_tags = null);
40 function gzinflate(string $data, int $length = 0): mixed;
42 function gzopen($filename, $mode, $use_include_path = false);
44 function gzpassthru($zp);
46 function gzputs($zp, $str, $length = 0);
48 function gzread($zp, $length = 0);
50 function gzrewind($zp);
52 function gzseek($zp, $offset, $whence = SEEK_SET);
56 function gzuncompress(string $data, int $length = 0): mixed;
58 function gzwrite($zp, $str, $length = 0);
60 function nzcompress($uncompressed);
62 function nzuncompress($compressed);
64 function qlzcompress($data, $level = 1);
66 function qlzuncompress(string $data, int $level = 1): mixed;
68 function readgzfile($filename, $use_include_path = false);
70 function zlib_decode(string $data, int $max_len = 0): mixed; // string or false
72 function zlib_encode(string $data, int $encoding, int $level = -1): mixed;
74 function zlib_get_coding_type();