On Wed, Mar 17, 2010 at 03:52:36PM -0700, Randall Leeds wrote: > It seems like couch should probably store content-encoding as metadata > on the attachment (like content-type) and pass these attachments > straight to disk and serve them up with the appropriate > content-encoding What happens if another client requests the same document but doesn't understand that particular Content-Encoding? Couchdb would then have to refuse to *serve* the document out to the second client, if its Accept-Encoding: list didn't include the encoding stored to disk. Or couchdb would have to transcode on demand, potentially twice: deflate->identity->gzip for example. > OR reject the original upload as unsupported. I think it should do this anyway for JSON document bodies. Couchdb shouldn't attempt to JSON-parse the body if it has come in using an encoding that it doesn't understand.