First, Sorry by me english
My question is
How get the size of Gzip compressed file?
To compress my html I use php/gzip this is the method that i use:
In
.htacess
# my pages are xhtml 1.0 and include XML declaration. to prevent PHP errors with <? ..... ?>
php_value short_open_tag 0
#.....enable compression
php_value zlib.output_compression 1
php_value zlib.output_compression_level 9
# for some reason if i put AddType here (overwriting the Apache config) I don't need include header("Content-Encoding: gzip"); in the scripts
AddType application/x-httpd-php .php .php4
# for now .php and .php files are COMPPRESSED
# next 2 lines Apache process other text extension via cprs.php script
####################################################
OK, I check the method in many ways and WORK Fine in all cases.
In my Remote webserver (Linux + Apache 2 + Php 4.3) and my local intranet (WinXP + Apache 1.3.27 + Php 4.3)
Test 2
======
Using Firefox 1.0.4 and WebDeveloper Plugin and enable/disable php_value zlib.output_compression in .htaccess
For php_value zlib.output_compression 0 (no compression)
Response Headers - ....
Date: Sat, 19 Nov 2005 20:32:15 GMT
Server: Apache/1.3.27 (Win32) mod_perl/1.27_01-dev
Licencia: GcG
200 OK
in this sample use gztest.txt (50000 bytes)
Windows filesystem report 48,8 KB (50.000 bytes)
In the Firefox, right click, page info report 0.37 KB (375 bytes)
Tests 5
======
Go to Opera Cache folder
Double Click in opr00TQX.txt (374bytes) and notepad show something like this
бJ@=wh*q*[$Mq^]\uA7q.<9lSWE{JS_x<x<x<x<x<x<x<x<x<x<x<x<x<x<x<x<x<x<x<x<x<x<x<{?*'x<M}CSyT,5E]ꢪPj2lv/qiHcЖM!yscpW @ EN
Now (you need winrar instaled in the system), rename opr00TQX.txt
as opr00TQX.txt.rar, double click and now, you can see opr00TQX.txt
into the rar file, open and Notepad show the uncompressed version of
txt file
Bookmarks