Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : Bzip2 Compression Functions : bzread

bzread

Binary safe bzip2 file read (PHP 4 >= 4.3.3, PHP 5, PECL bz2:1.0)
string bzread ( resource bz [, int length] )

Example 362. bzread() example

<?php

$file
= "/tmp/foo.bz2";
$bz = bzopen($file, "r") or die("Couldn't open $file");

$decompressed_file = '';
while (!
feof($bz)) {
 
$decompressed_file .= bzread($bz, 4096);
}
bzclose($bz);

echo
"The contents of $file are: <br />\n";
echo
$decompressed_file;

?>

Code Examples / Notes » bzread

bitlz

max value of length is 8192 (2^13).
if length is more than 8192 bzread understand as 8192. :)
ps. php 5.0.0 under win2k sp4.


Change Language


Follow Navioo On Twitter
bzclose
bzcompress
bzdecompress
bzerrno
bzerror
bzerrstr
bzflush
bzopen
bzread
bzwrite
eXTReMe Tracker