(PHP 4 >= 4.0.4, PHP 5, PHP 7)
bzread — bzip2 �ļ������ư�ȫ�ض�ȡ
$bz
[, int $length
= 1024
] ) : stringbzread() ��ָ���� bzip2 �ļ�ָ���ж�ȡ���ݡ�
��ȡ�� length
��δ��ѹ���ij��ȣ����ֽڣ����ߵ��ļ�β��ȡ�����ȵ��ĸ���
bz
�ļ�ָ�롣����������Ч�IJ���ָ�� bzopen() �ɹ����ļ���
length
���û���ṩ�� bzread() һ�λ���� 1024 ���ֽڣ�δ��ѹ���ij��ȣ��� һ�����ɶ��� 8192 ��δѹ�����ֽڡ�
���ؽ�ѹ�����ݣ��ڴ���ʱ���� 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;
?>