lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


FYI, if you want a streaming interface to zlib, you can try this out:

  http://github.com/brimworks/lua-zlib

It is a small bit of code that I wrote for fun.  Note that it
currently hard-codes deflateInit() and inflateInit(), but after more
experience of using zlib, I now know that if you want gzip headers to
be properly read, you need to use inflateInit2() and pass in MAX_WBITS
+ 32 magic number for the window size :-(.  I'll see about fixing
this.

I should also add options so that deflateInit2() parameters may be
specified (give the library more flexibility).

Thanks,
-Brian

On Thu, Jan 28, 2010 at 3:01 PM, Phoenix Sol <phoenix@burninglabs.com> wrote:
> On Thu, Jan 28, 2010 at 4:16 PM, GrayFace <sergroj@mail.ru> wrote:
>>
>> ZLib itself does support decompressing by chunks. You can read any number
>> of bytes from the decompression stream.
>
> Oh yeah. Duh, I've piped compressed data through gzip -d before; same thing,
> right?
> ...time passes...
> Ha. Got it working. Thanks!!



-- 
Brian Maher >> Glory to God <<