CodeIgniter Forums
i wanna test gzip - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: i wanna test gzip (/showthread.php?tid=44046)



i wanna test gzip - El Forum - 08-01-2011

[eluser]Unknown[/eluser]
Hey , some body tell me if CI has a helper for gzip HTTP requesting and responding or no ,

also i wanna test gzip request from a function to another one without using file_get_content as i don't have the URL ,
thanks


i wanna test gzip - El Forum - 08-01-2011

[eluser]danmontgomery[/eluser]
application/config/config.php

Code:
/*
|--------------------------------------------------------------------------
| Output Compression
|--------------------------------------------------------------------------
|
| Enables Gzip output compression for faster page loads. When enabled,
| the output class will test whether your server supports Gzip.
| Even if it does, however, not all browsers support compression
| so enable only if you are reasonably sure your visitors can handle it.
|
| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
| means you are prematurely outputting something to your browser. It could
| even be a line of whitespace at the end of one of your scripts. For
| compression to work, nothing can be sent before the output buffer is called
| by the output class. Do not 'echo' any values with compression enabled.
|
*/
$config['compress_output'] = FALSE;



i wanna test gzip - El Forum - 08-02-2011

[eluser]Unknown[/eluser]
thnx noctrum ,
but that's not my prob , There is a request to my function comes with "Content-Encoding: gzip" data in $_POST
i need to decompress this data


i wanna test gzip - El Forum - 08-02-2011

[eluser]Nicholas Bello[/eluser]
Take a look at PHP's gzdecode() function and let me know if that's what you are looking for.

Nick