PHP.nl

bzwrite

bzwrite

Binary safe bzip2 file write

 **bzwrite** resource $bz string $data  $length
writes a string into the given bzip2 file

stream. bzwrite

bz The file pointer. It must be valid and must point to a file successfully opened by . bzopen

dataThe written data.

length If supplied, writing will stop after (uncompressed) bytes have been written or the end of is reached, whichever comes first. length``data

Returns the number of bytes written, or false on error.

Voorbeeld: example

<?php
$str = "uncompressed data";
$bz = bzopen("/tmp/foo.bz2", "w");
bzwrite($bz, $str, strlen($str));
bzclose($bz);
?>

bzread``bzopen