this is a more battle hardened version of the deflate compressor plugin we use in production for a few months now
// WHAT THIS PLUGIN DOES:
// in spite of its name, it compresses responses to the raw deflate format.
// it also normalizes the accept-encoding header from user agent requests
// to either deflate or nothing. it compresses responses from origins only,
// though it can be modified easily to also compress contents from cache.
// MAJOR ISSUES:
// - there is an issue with some origins that send connection:close.
// the plugin will not execute in that situation as a temporary fix.
// - the workings of this plugin support our use case, but probably is not
// on size fits all. it shouldnt be too hard to adjust it to your own needs though.