Gzip

Gzip, and compression is awesome. So while I wanted to keep the server simple, I also wanted to keep it small. I added gzip to the very short list of supported features.

Why is it awesome? Because it allows us to minimize the amount of data we need to transfer over the wire (or air?). Your client already supports it! (if you client is a somewhat modern browser - modern meaning not older than 15 years[0]).

If you are curious, the maximum compression rate of gzip seems to be 1032:1 [1].

Checking if the header included Accept-Encoding: gzip and responding with Content-Encoding: gzip as well as actually compressing the byte stream added ~30kb to the binary.

While reading about compression I learned about the Hutter price and Kolmogorov Complexity

Fascinating field!

[0] https://webmasters.stackexchange.com/a/22223
[1] https://stackoverflow.com/a/16794960/17630767