Gzip compression and Transfer-Encoding

Dave Cheney dave at cheney.net
Mon Oct 22 11:53:22 MSD 2007


	We use the following settings for gzip compression

    gzip  on;
    gzip_min_length  1100;
    gzip_comp_level  5;
    gzip_buffers     4 16k;
    gzip_types       text/html text/plain text/xml text/css  
application/x-javascript application/atom+xml;

	Which leads to good compression but regardless of the size of the  
document always requires chunked encoding to send the resulting data.  
For larger documents this doesn't matter, but for smaller documents I  
would like to provide a Content-Length header and avoid chunked  

	Is their a buffer setting that specifies the size of the initial  
buffer to be compressed, the idea being that if the whole response  
body fits in that one buffer, it can be compressed in one go, and the  
resulting content length discovered.

Kind Regards

Dave Cheney

More information about the nginx mailing list