Gzip_static - any way to not have to store two files?

right now we have to store two files - compressed and uncompressed.
couldn’t nginx just read compressed file from filesystem and uncompress
on the fly and send?

Posted at Nginx Forum:

Hello!

On Wed, Jan 20, 2010 at 07:43:37PM -0500, arianna wrote:

right now we have to store two files - compressed and
uncompressed. couldn’t nginx just read compressed file from
filesystem and uncompress on the fly and send?

Out of the box - currently no.

You may do this with gunzip filter and gzip_static always patch,
see here:

http://nginx.org/pipermail/nginx/2009-December/017837.html
http://nginx.org/pipermail/nginx-devel/2009-December/000064.html

Maxim D.

terrific!!! thanks!!!

Posted at Nginx Forum:

ok…i didn’t realize is was uncompressing a response on the fly… what
i wanted was some variation on gzip_static that could take file.gz in
the file system and use it to return compressed/or uncompressed data to
the client. i guess i’m out of luck correct?

Posted at Nginx Forum:

AWESOME…THANKS!!!

Posted at Nginx Forum:

Hello!

On Wed, Jan 20, 2010 at 10:59:40PM -0500, arianna wrote:

ok…i didn’t realize is was uncompressing a response on the
fly… what i wanted was some variation on gzip_static that
could take file.gz in the file system and use it to return
compressed/or uncompressed data to the client. i guess i’m out
of luck correct?

With “gzip_static always” patch you are able to return .gz even to
clients which doesn’t support it.

With gunzip filter you are able to gunzip gzipped responses for
clients which doesn’t support gzip.

When used together they allow exactly what you asked for - one .gz
file on filesystem, returned unmodified to clients which does
support gzip, uncompression on the fly for clients which
does not support gzip.

Maxim D.

working like a charm now…thanks again!

Posted at Nginx Forum: