Skip to main content
Module

x/oak_compress/mod.ts>deflate

oak middleware, support br, gzip and deflate
Latest
function deflate
import { deflate } from "https://deno.land/x/oak_compress@v0.0.2/mod.ts";

A middleware that will compress with brotli.

import { deflate } from "https://deno.land/x/oak_compress/mod.ts";
import { Application } from "https://deno.land/x/oak/mod.ts"

const app = new Application();
app.use(deflate());

// other middleware

await app.listen(":80");

Parameters

optional
level: number
optional
options: boolean | CompressOptions