This plugin compresses output to the client with two encoding type options: gzip and deflate. It first checks the request headers to decide which encoding type to use. The gzip is the preferred encoding method. If the client support neither, it immediately ignores. This plugin only compresses contents of the defined mime types and the default mime types are: ['text/plain', 'text/html', 'text/css', 'application/json',
- WARNING: This plugin only supports dynamicly generated content.
- It doesn't work with staic_file method. In this case, you should put the plugin into the 'skip' argument and so the plugin will not apply to the route.
Copyright (c) 2011-2012, Li Gang, Roy Shan License: MIT