/stubs/zlib.php

https://github.com/FractalizeR/php-stubs · PHP · 371 lines · 26 code · 25 blank · 320 comment · 0 complexity · 565548cec02a136debd9f7da33d2b584 MD5 · raw file

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