einsteinx2/WaveBox — pull request #121 by mdlayher (2013-07-18 01:37:08+00:00)
Title: Add support for gzip and deflate encoding on HTTP server response

Title says it. Here are some numbers to back up my cause! The bandwidth and time savings will be handy! I am not sure if jQuery can do gzip'd requests, but certainly other API clients will be able to take advantage of this in the future.

```
Test conditions:
4567 songs
Google Chrome, Accept-Encoding: gzip,deflate
Crappy internet connection

branch master:

/api/songs, prettyJson: true
Size: 2.5MB
Content: 2.5MB
Time: 11.61s
Latency: 529ms

/api/songs, prettyJson: false
Size: 1.7MB
Content: 1.7MB
Time: 7.24s
Latency: 629ms

branch http_gzip:

/api/songs, prettyJson: true
Size: 204KB
Content: 2.5MB
Time: 1.82s
Latency: 850ms

/api/songs, prettyJson: false
Size: 188KB
Content: 1.7MB
Time: 962ms
Latency: 620ms
```