[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lzlib usage
- From: GrayFace <sergroj@...>
- Date: Fri, 29 Jan 2010 04:16:40 +0600
ZLib itself does support decompressing by chunks. You can read any
number of bytes from the decompression stream.
On 29.01.2010 4:01, Phoenix Sol wrote:
On Thu, Jan 28, 2010 at 3:23 PM, Sam Roberts <firstname.lastname@example.org
2010/1/28 Ignacio Burgueño <email@example.com
> Here is an example using deflate. It does the compression using
> one needs to have the entire resulting data in memory because
you need to
> send the actual (compressed) content-length before sending the
> of course, if you're dealing with http)
Can't you use chunked mode content-transfer-mode with compression?
Yeah, you can use chunked transfer with compression, and I thought I
could decompress, process, and recompress chunks of a message body in
a stream. False assumption. The entire message body is compressed
before it is transfered, and individual chunks can't be decompressed.
Since I want to avoid the possibility of being caught holding a bunch
of large message bodies in memory, I think I will avoid accepting
compressed messages from the origin server. I will just support
compression in addition to chunked transfer from proxy to client.
Thanks for helping.
Sergey Rozhenko mailto:firstname.lastname@example.org