A contribution to compression with gzip and some answers to Maurizio's 
questions :

It is a good idea to put the whole stuff in another unit.

a/ The site 'http://www.pipeboost.com/' works today for me in T_HttpCliGz.
If not, check if zlib.dll is well loaded.
Maurizio, if you want, I can send you my .exe

b/ FGzTime is used to know the time of reception and decompression. It can help 
to choose a good compression level on the server side.
For example, I chose level 6 in a first time for one of my sites. After tests, 
the level 1 was better...

c/ I chose to decompress at the end of reception, because in my xGzipStream 
unit, the decompression is done for the whole stream after reading the number 
of uncompressed bytes. This value is at the end of the stream.
We may decompress on the fly, but the units have to be rewritten. With the 
actual RAM memory, I don't think it is necessary.

d/ I think that the RcvdStream can contain the compressed data during the 
reception. So, RcvdCount can be used for a progress bar. At the end of 
reception, I consider, according to Fran├žois's message of 09/05/2005 ("the user 
has not to know if the received data were compressed or not") that RcvdStream 
and RcvdCount are relative to uncompressed data.
I don't see why we have to keep the uncompressed data. Only my variable 
GzContentLength keeps the compressed length.

e/ FRequestVer is set to 1.1, because some site don't compress if 1.0 is sent.

f/ In my code, I have a GzAcceptEncoding boolean to disconnect compression if 
necessary. It would be nice to keep it in case of problem with some sites.

Sorry, I have not time today si answer other questions.


To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to