original_string: public function pack($from, $to)
      {
          if (($gzip = gzopen($to, 'wb')) === false) {
              throw new Exception('Unable create compressed file.');
          }
  
          if (($source = fopen($from, 'rb')) === false) {
              throw new Exception('Unable open the compression source file.');
          }
  
          while (!feof($source)) {
              $content = fread($source, 4096);
              gzwrite($gzip, $content, strlen($content));
          }
  
          gzclose($gzip);
          fclose($source);
      }
code: public function pack($from, $to)
      {
          if (($gzip = gzopen($to, 'wb')) === false) {
              throw new Exception('Unable create compressed file.');
          }
  
          if (($source = fopen($from, 'rb')) === false) {
              throw new Exception('Unable open the compression source file.');
          }
  
          while (!feof($source)) {
              $content = fread($source, 4096);
              gzwrite($gzip, $content, strlen($content));
          }
  
          gzclose($gzip);
          fclose($source);
      }
code_tokens: public function pack ( $ from , $ to ) { if ( ( $ gzip = gzopen ( $ to , 'wb' ) ) === false ) { throw new Exception ( 'Unable create compressed file.' ) ; } if ( ( $ source = fopen ( $ from , 'rb' ) ) === false ) { throw new Exception ( 'Unable open the compression source file.' ) ; } while ( ! feof ( $ source ) ) { $ content = fread ( $ source , 4096 ) ; gzwrite ( $ gzip , $ content , strlen ( $ content ) ) ; } gzclose ( $ gzip ) ; fclose ( $ source ) ; }
docstring: Compresses a file.
  
  @param  string $from The source
  @param  string $to   The target
  @throws Exception
docstring_tokens: Compresses a file .