Re: how to determine size of gz-handler output

From: Date: Sat, 30 Jun 2001 02:31:07 +0000
Subject: Re: how to determine size of gz-handler output
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-55636@lists.php.net to get a copy of this message
>I'd like to know how small my content gets when i use >ob_gzhandler. >so far i tried >$cont=ob_get_contents(); >$length=strlen($cont); >echo "<!-- $length -->\n"; > >but it outputs ><!-- 17280 --> > >while apache says in its logfile: >217.81.41.121 - - [29/Jun/2001:12:43:59 +0200] "GET / HTTP/1.1" 200 2028 [WILD GUESS ALERT!] I'm guessing the gzip part happens "in place" as the data is being streamed to the browser, not before you call ob_get_contents. If so, you now have one data point. Your 17280-character string gets turned into 2028 (?) bytes??? To see if this is maybe a correct thesis, snag the HTML output, and run gzip on it, and see if it's 17,280 bytes before and 2028 after. So maybe there's no real way to know what the compressed size is... Unless you want to try to match up your log file entries with your ob_get_contents measurement above. Does gz-handler not provide any facility for measuring its performance or anything?... You'd think it would... -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#55636) next »