gzip to max 9

This is a discussion on gzip to max 9 within the PHP General forums, part of the PHP Programming Forums category; Dear All, <?php function wrl2wrz($buffer) { return gzencode ($buffer, 9); } ob_start("wrl2wrz"); /* here the file */ ob_end_flush(); # end ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-09-2003
Decapode Azur
 
Posts: n/a
Default gzip to max 9

Dear All,


<?php
function wrl2wrz($buffer) { return gzencode ($buffer, 9); }
ob_start("wrl2wrz");

/* here the file */

ob_end_flush(); # end of the output buffering
?>

In this exemple with output beffering it is possible to select the maximum
compression level,

is it possible to select the maximum compression level too
when writing in a file like below ??

$gzp = fopen($output_file, 'w');
gzwrite($gzp, $content);
gzclose($gzp);


I think that the default compression level here is 6,
and I would like to bring it to the maximum value 9.

--
cheers

Reply With Quote
  #2 (permalink)  
Old 08-09-2003
Evan Nemerson
 
Posts: n/a
Default Re: [PHP] gzip to max 9

try setting zlib.output_compression_level in your php.ini



On Saturday 09 August 2003 09:42 am, Decapode Azur wrote:
> Dear All,
>
>
> <?php
> function wrl2wrz($buffer) { return gzencode ($buffer, 9); }
> ob_start("wrl2wrz");
>
> /* here the file */
>
> ob_end_flush(); # end of the output buffering
> ?>
>
> In this exemple with output beffering it is possible to select the maximum
> compression level,
>
> is it possible to select the maximum compression level too
> when writing in a file like below ??
>
> $gzp = fopen($output_file, 'w');
> gzwrite($gzp, $content);
> gzclose($gzp);
>
>
> I think that the default compression level here is 6,
> and I would like to bring it to the maximum value 9.


--
"A leader is the wave pushed ahead by the ship."

-Leo Nikolaevich Tolstoy

Reply With Quote
  #3 (permalink)  
Old 08-10-2003
Decapode Azur
 
Posts: n/a
Default Re: [PHP] gzip to max 9


> try setting zlib.output_compression_level in your php.ini


won't it turn 'zlib.output_compression' to On ?
(because I prefere to keep it Off)


--
> > <?php
> > function wrl2wrz($buffer) { return gzencode ($buffer, 9); }
> > ob_start("wrl2wrz");
> > /* here the file */
> > ob_end_flush(); # end of the output buffering
> > ?>
> >
> > In this exemple with output beffering it is possible to select the
> > maximum compression level,
> >
> > is it possible to select the maximum compression level too
> > when writing in a file like below ??
> >
> > $gzp = fopen($output_file, 'w');
> > gzwrite($gzp, $content);
> > gzclose($gzp);
> >
> > I think that the default compression level here is 6,
> > and I would like to bring it to the maximum value 9.


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 02:35 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0