Guys... remember to enable gzip compression in Nginx. 5x performance boost for doing nothing.

Reply to this note

Please Login to reply.

Discussion

People don’t gzip?!

Depending on settings it might consume more CPU than bandwidth throughput gain. Btw, have a look at brotli too.

Good reminder!

Can I do this on Deno/hono when returning an .atom file?

I'm using Deno deploy, so maybe something native there would also be ok.

I think Deno Deploy probably handles it for you automatically.

Looks like there's Hono compress:

import { compress } from 'hono/compress';

const app = new Hono();

app.use(compress());

app.get('/file', async (c) => {

const file = await Deno.open('./path/to/your/file.txt');

return c.res.send(file);

});

Got it from perplexity.ai. I hope it's not BS