InMotion Web Site Hosting
InMotion Hosting Home


bzread

(4.0.4 - 4.3.2 only)

bzread -- Binary safe bzip2 file read

Description

string bzread ( resource bz [, int length])

bzread() reads up to length bytes from the bzip2 file pointer referenced by bz. Reading stops when length (uncompressed) bytes have been read or EOF is reached, whichever comes first. If the optional parameter length is not specified, bzread() will read 1024 (uncompressed) bytes at a time.

Example 1. bzread() Example

<?php
$bz = bzopen("/tmp/foo.bz2", "r");
$str = bzread($bz, 2048);
print( $str );
?>

See also bzwrite() and bzopen().


InMotion Web Hosting Customer Support
M-F 8am - 7pm PST
213-239-0050

More information can be found at the InMotion Hosting Main Site

>