lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: http server unzip


From: Wilson, Dave (Stellaris S/W)
Subject: [lwip-users] Re: http server unzip
Date: Thu, 6 May 2010 08:06:59 -0500

I rather like this idea and reckon it could be a big help especially in controlled environments where you can be sure that the browsers used to connect to your device will support “Accept-Encoding: gzip”. If this is the case, using the HTTPD server updates I passed to Simon recently, you could merely add pre-compressed .gz files to your file system image and make a small modification to httpd.c to ensure that any file with extension “.gz” is sent with the “Content-Encoding: gzip” header. This would mean that the device-side code didn’t ever have to unzip the files.

 

To support cases where the browser didn’t support gzip, you would have to include the unzip code and send the file content unencoded in those cases. That would likely not be too tricky and could probably be done on the fly rather than having to decode the whole file into RAM before sending it.

 

In both cases, there will obviously be a trade-off between added code size and compression savings. If you are working with an HTML-heavy embedded web site image, compression probably makes sense but if the file system image is dominated by image files, it likely won’t help much. In this case, an investment of some time in Photoshop optimising the GIF, JPEG or PNG images for web use may be more helpful.

 

  Regards,

 

Dave Wilson


reply via email to

[Prev in Thread] Current Thread [Next in Thread]