PHP
downloads | documentation | faq | getting help | mailing lists | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

bzwrite> <bzopen
Last updated: Sun, 25 Nov 2007

view this page in

bzread

(PHP 4 >= 4.3.3, PHP 5, PECL bz2:1.0)

bzread — Binárne načítanie bizip2 súboru

Popis

string bzread ( resource $bz [, int $length ] )

bzread() načíta length bytov z ukazovateľa súboru bzip2 odvolávaný ako bz . Čítanie sa preruší ak sa načíta length (nekomprimvaných) bytov alebo sa dosiahne EOF. Ak nie je špecifikovaný voliteľný parameter length , tak bzread() načíta 1024 (nekomprimovaných) bytov naraz.

Example#1 bzread() príklad

<?php

$file 
"/tmp/foo.bz2";
$bz bzopen($file"r") or die("Nemozno otvorit $file");

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

echo 
"Obsahom /tmp/foo.bz2 su: <br />\n";
echo 
$decompressed_file;

?>

Tiež pozri bzwrite() feof() a bzopen().



add a note add a note User Contributed Notes
bzread
bitlz at mail dot ru
05-Aug-2004 07:02
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.

bzwrite> <bzopen
Last updated: Sun, 25 Nov 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites