I am using CouchDB as backend for some iPhone applications, and one of the issues I have is that that the responses are verbose, which is an issue over cellular. I decided to take a crack at gzip support, and I have something working. A few of you might have seen my post about this on the mochiweb list a few days ago, I think I have a solution that will be more acceptable for mochiweb, so a significant chunk of the code might not really be in CouchDB itself.
Having said that, I have posted a branch with the first cut on github. It works for all GET requests. It also adds buffering to coalesce small chunks together even when gzip is not being used. This is my first erlang code, so it is definitely not not what I would consider production quality. In particular: Some of the code is in the wrong place (like type negotiation) It is not properly documented, since I have not read up on Erlang documentation style It could do better compression with a little more work (fully flushes data and resets state when it could avoid that) On the other hand, it appears to generally work and for my usage it already is a pretty big win with no changes in our client app ;-) I will be cleaning it up a bit, trying to make it acceptable to mochiweb, perform better, etc. If anyone is interested you can grab the current patchset from <http://github.com/lgerbarg/couchdb/tree/gzip-support>. Louis