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

search for in the

bzwrite> <bzopen
Last updated: Fri, 18 Jul 2008

view this page in

bzread

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

bzread — Esegue la lettura binaria di un file bzip2

Descrizione

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

bzread() legge fino a lunghezza byte dal puntatore bzip2 specificato da bz . La pettura termina quando lunghezza byte (decompressi) sono stati letti o quando viene raggiunto l'EOF. Se il parametro opzionale lunghezza è omesso, bzread() leggerà 1024 byte (decompressi) ogni volta.

Example #1 Esempio di bzread()

<?php

$file 
"/tmp/foo.bz2";
$bz bzopen($file"r") or die("Non ho potuto aprire $file");

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

echo 
"Il contenuto di $file è: <br />\n";
echo 
$file_decompresso;

?>

Vedere anche bzwrite(), feof() e bzopen().



add a note add a note User Contributed Notes
bzread
bitlz at mail dot ru
05-Aug-2004 04: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: Fri, 18 Jul 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites