PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8
bzread - Binary safe bzip2 file read
Code Examples

bzread( resource$bz, [int$length = 1024] ): string|false

bzread reads from the given bzip2 file pointer.

Reading stops when length (uncompressed) bytes have been read or EOF is reached, whichever comes first.



The file pointer. It must be valid and must point to a file successfully opened by bzopen.


If not specified, bzread will read 1024 (uncompressed) bytes at a time. A maximum of 8192 uncompressed bytes will be read at a time.

Return Values

Returns the uncompressed data, or false on error.

Related Functions

Example of bzread

Show all examples for bzread

PHP Version:

Function bzread:

Bzip2 Functions

Most used PHP functions