compress

An extension to compress the body of the response with Brotli, gzip, or deflate, based on the Accept-Encoding header of the incoming request.

Please don't use this extension when you're deploying your app to Deno Deploy or Cloudflare Workers as they handle this for you in a much more optimized way.

import cheetah from 'https://deno.land/x/cheetah/mod.ts'
import { compress } from 'https://deno.land/x/cheetah/ext/compress.ts'

const app = new cheetah()
  .use(compress())