[Libwebsockets] serving compressed http response from a zip archive

Per Bothner per at bothner.com
Wed Feb 15 07:14:53 CET 2017


On 02/13/2017 06:49 PM, Per Bothner wrote:

>>> So I have to decide to clean up junzip (compact, familiar)
>>> or use some other library (probably contrib/minizip from zlib).
>>> (The former is probably easier.)
>>
>> zlib is already integrated to lws for permessage-deflate ws extension fwiw.
>
> I'm using the system zlib (at least on Fedora).  Or rather JUnzip does.
> That takes care of the actual uncompressing.  However, you still need to
> parse and seek in the zip archive file.  For that I use JUnzip.  It's
> not very complicated (for our limited needs), so it should be easy
> rewrite JUnzip so it is clean and portable.

FWIW I've re-written/cleaned-up JUnzip.  It is now more portable
(handles big-endian machines), and is simper and faster, but
at the cost of harw-wiring in that the entire zip archive is in memory.

-- 
	--Per Bothner
per at bothner.com   http://per.bothner.com/



More information about the Libwebsockets mailing list