| 1 |
<?php |
| 2 |
|
| 3 |
// Start of bz2 v. |
| 4 |
|
| 5 |
/** |
| 6 |
* Opens a bzip2 compressed file |
| 7 |
* @link http://www.php.net/manual/en/function.bzopen.php |
| 8 |
* @param filename string <p> |
| 9 |
* The name of the file to open, or an existing stream resource. |
| 10 |
* </p> |
| 11 |
* @param mode string <p> |
| 12 |
* Similar to the fopen function, only 'r' (read) |
| 13 |
* and 'w' (write) are supported. Everything else will cause bzopen |
| 14 |
* to return false. |
| 15 |
* </p> |
| 16 |
* @return resource If the open fails, bzopen returns false, otherwise |
| 17 |
* it returns a pointer to the newly opened file. |
| 18 |
*/ |
| 19 |
function bzopen ($filename, $mode) {} |
| 20 |
|
| 21 |
/** |
| 22 |
* Binary safe bzip2 file read |
| 23 |
* @link http://www.php.net/manual/en/function.bzread.php |
| 24 |
* @param bz resource <p> |
| 25 |
* The file pointer. It must be valid and must point to a file |
| 26 |
* successfully opened by bzopen. |
| 27 |
* </p> |
| 28 |
* @param length int[optional] <p> |
| 29 |
* If not specified, bzread will read 1024 |
| 30 |
* (uncompressed) bytes at a time. A maximum of 8192 |
| 31 |
* uncompressed bytes will be read at a time. |
| 32 |
* </p> |
| 33 |
* @return string the uncompressed data, or false on error. |
| 34 |
*/ |
| 35 |
function bzread ($bz, $length = null) {} |
| 36 |
|
| 37 |
/** |
| 38 |
* Binary safe bzip2 file write |
| 39 |
* @link http://www.php.net/manual/en/function.bzwrite.php |
| 40 |
* @param bz resource <p> |
| 41 |
* The file pointer. It must be valid and must point to a file |
| 42 |
* successfully opened by bzopen. |
| 43 |
* </p> |
| 44 |
* @param data string <p> |
| 45 |
* The written data. |
| 46 |
* </p> |
| 47 |
* @param length int[optional] <p> |
| 48 |
* If supplied, writing will stop after length |
| 49 |
* (uncompressed) bytes have been written or the end of |
| 50 |
* data is reached, whichever comes first. |
| 51 |
* </p> |
| 52 |
* @return int the number of bytes written, or false on error. |
| 53 |
*/ |
| 54 |
function bzwrite ($bz, $data, $length = null) {} |
| 55 |
|
| 56 |
/** |
| 57 |
* Force a write of all buffered data |
| 58 |
* @link http://www.php.net/manual/en/function.bzflush.php |
| 59 |
* @param bz resource <p> |
| 60 |
* The file pointer. It must be valid and must point to a file |
| 61 |
* successfully opened by bzopen. |
| 62 |
* </p> |
| 63 |
* @return int Returns true on success, false on failure. |
| 64 |
*/ |
| 65 |
function bzflush ($bz) {} |
| 66 |
|
| 67 |
/** |
| 68 |
* Close a bzip2 file |
| 69 |
* @link http://www.php.net/manual/en/function.bzclose.php |
| 70 |
* @param bz resource <p> |
| 71 |
* The file pointer. It must be valid and must point to a file |
| 72 |
* successfully opened by bzopen. |
| 73 |
* </p> |
| 74 |
* @return int Returns true on success, false on failure. |
| 75 |
*/ |
| 76 |
function bzclose ($bz) {} |
| 77 |
|
| 78 |
/** |
| 79 |
* Returns a bzip2 error number |
| 80 |
* @link http://www.php.net/manual/en/function.bzerrno.php |
| 81 |
* @param bz resource <p> |
| 82 |
* The file pointer. It must be valid and must point to a file |
| 83 |
* successfully opened by bzopen. |
| 84 |
* </p> |
| 85 |
* @return int the error number as an integer. |
| 86 |
*/ |
| 87 |
function bzerrno ($bz) {} |
| 88 |
|
| 89 |
/** |
| 90 |
* Returns a bzip2 error string |
| 91 |
* @link http://www.php.net/manual/en/function.bzerrstr.php |
| 92 |
* @param bz resource <p> |
| 93 |
* The file pointer. It must be valid and must point to a file |
| 94 |
* successfully opened by bzopen. |
| 95 |
* </p> |
| 96 |
* @return string a string containing the error message. |
| 97 |
*/ |
| 98 |
function bzerrstr ($bz) {} |
| 99 |
|
| 100 |
/** |
| 101 |
* Returns the bzip2 error number and error string in an array |
| 102 |
* @link http://www.php.net/manual/en/function.bzerror.php |
| 103 |
* @param bz resource <p> |
| 104 |
* The file pointer. It must be valid and must point to a file |
| 105 |
* successfully opened by bzopen. |
| 106 |
* </p> |
| 107 |
* @return array an associative array, with the error code in the |
| 108 |
* errno entry, and the error message in the |
| 109 |
* errstr entry. |
| 110 |
*/ |
| 111 |
function bzerror ($bz) {} |
| 112 |
|
| 113 |
/** |
| 114 |
* Compress a string into bzip2 encoded data |
| 115 |
* @link http://www.php.net/manual/en/function.bzcompress.php |
| 116 |
* @param source string <p> |
| 117 |
* The string to compress. |
| 118 |
* </p> |
| 119 |
* @param blocksize int[optional] <p> |
| 120 |
* Specifies the blocksize used during compression and should be a number |
| 121 |
* from 1 to 9 with 9 giving the best compression, but using more |
| 122 |
* resources to do so. |
| 123 |
* </p> |
| 124 |
* @param workfactor int[optional] <p> |
| 125 |
* Controls how the compression phase behaves when presented with worst |
| 126 |
* case, highly repetitive, input data. The value can be between 0 and |
| 127 |
* 250 with 0 being a special case. |
| 128 |
* </p> |
| 129 |
* <p> |
| 130 |
* Regardless of the workfactor, the generated |
| 131 |
* output is the same. |
| 132 |
* </p> |
| 133 |
* @return mixed The compressed string, or an error number if an error occurred. |
| 134 |
*/ |
| 135 |
function bzcompress ($source, $blocksize = null, $workfactor = null) {} |
| 136 |
|
| 137 |
/** |
| 138 |
* Decompresses bzip2 encoded data |
| 139 |
* @link http://www.php.net/manual/en/function.bzdecompress.php |
| 140 |
* @param source string <p> |
| 141 |
* The string to decompress. |
| 142 |
* </p> |
| 143 |
* @param small int[optional] <p> |
| 144 |
* If true, an alternative decompression algorithm will be used which |
| 145 |
* uses less memory (the maximum memory requirement drops to around 2300K) |
| 146 |
* but works at roughly half the speed. |
| 147 |
* </p> |
| 148 |
* <p> |
| 149 |
* See the bzip2 documentation for more |
| 150 |
* information about this feature. |
| 151 |
* </p> |
| 152 |
* @return mixed The decompressed string, or an error number if an error occurred. |
| 153 |
*/ |
| 154 |
function bzdecompress ($source, $small = null) {} |
| 155 |
|
| 156 |
// End of bz2 v. |
| 157 |
?> |