koajs/koa — pull request #22 by jonathanong (2013-08-17 19:03:47+00:00)
Title: compress: initial commit, no test added yet

was looking at how responses are done, thought it would be much easier to support compression at the core. here's a quick prototype. i haven't added tests yet.

the options are exposed on the context as `context.compressOptions`, `context.compressThreshold`, and `context.compressFilter`. i'm not sure how settings will work in koa, but you may want to check the settings instead or in addition to the context.

if you want to merge this, i'll add tests.