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.
bzread
(PHP 4 >= 4.0.4, PHP 5)
bzread — 바이너리 안전 bzip2 파일 읽기
설명
string bzread
( resource $bz
[, int $length= 1024
] )
bzread()는 주어진 bzip2 파일 포인터에서 읽습니다.
(압축 해제된) length 바이트를 읽었거나 EOF에 도달했을 때 읽기를 중단합니다.
인수
- bz
-
bzopen()으로 성공적으로 연 파일을 가리키는 유효한 파일 포인터.
- length
-
지정하지 않으면, bzread()는 한 번에 (압축 해제된) 1024 바이트를 읽습니다.
반환값
압축해제된 데이터를 반환하거나, 오류 시엔 FALSE를 반환합니다.
예제
Example #1 bzread() 예제
<?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;
?>
bzread
bitlz at mail dot ru
05-Aug-2004 02:02
05-Aug-2004 02:02
