Close

Compression

A project log for HTTaP

Test Access Port over HTTP

yann-guidon-ygdesYann Guidon / YGDES 03/27/2017 at 23:500 Comments

HTTaP should not be used in public-facing networks, where bandwidth is a concern (latency often is more important). Compression is not a priority but it IS possible to implement it.

The inherent cost is that the server needs to parse the request headers and find the line that declares that compressed files are allowed. It's possible but this uselessly increases the coding effort...


20170429:

A couple of interesting things to notice.

First, compression is interesting for large files, not the small requests and answers. This happens in two cases:

Second, the client is not expected to change its capabilities during a TCP session. This means that the headers can be parsed just once, when the server receives the first request. The next requests can just skip the headers.


20200505:

If needed, the #micro HTTP server in C could serve pre-compressed files thanks to the "shadow" system that adds headers.

Discussions