Related Links : Search Engine Optimization | | Search Engine Marketing | Online Marketing | Freelance Programmer| SEO Thailand | SEO Expert | SEO services | PHP Programmer Thailand | SEO Tutorial | What is SEO |

  Home Our SEO Services SEO Expert Consultant Php Programmer Keyword Suggestion Scripts|Articles| Email : sachin {at} jainsachin {dot} com

PHP | Binary safe bzip2 file read | Manual | Tutorial | Help

SEO Services



Website Programming in PHP / MYSQL



SEO Tools




    Friends


      Binary safe bzip2 file read

      bzread

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

      bzread — Binary safe bzip2 file read

      Description

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

      bzread() reads from the given bzip2 file pointer.

      Reading stops when length (uncompressed) bytes have been read or EOF is reached, whichever comes first.

      Parameters

      bz

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

      length

      If not specified, bzread() will read 1024 (uncompressed) bytes at a time.

      Return Values

      Returns the uncompressed data, or FALSE on error.

      Examples

      Example #1 bzread() example

      <?php

      $file 
      "/tmp/foo.bz2";
      $bz bzopen($file"r") or die("Couldn't open $file");

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

      echo 
      "The contents of $file are: <br />\n";
      echo 
      $decompressed_file;

      ?>


      SEO Tutorial / Articles





      Php / Mysql Tutorial



      Articles



        Other Topics



        SEO by Jainsachin