• PHP Video Tutorials

PHP - bzip2 bzdecompress() Function


Advertisements

bzdecompress() function can decompress the bzip2 encoded data.

Syntax

mixed bzdecompress( string $source [, int $small = 0 ] )

bzdecompress() function can decompress a given string containing bzip2 encoded data.

bzdecompress() function can return a decompressed string or error number in case of an error.

Example

<?php
   $start_str = "This is not an honest face?";
   $bzstr = bzcompress($start_str);

   echo "Compressed String: ";
   echo $bzstr;
   echo "\n<br/>\n";

   $str = bzdecompress($bzstr);
   
   echo "Decompressed String: ";
   echo $str;
   echo "\n<br />\n";
?>  
php_function_reference.htm
Advertisements