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.

Reply to this note

Please Login to reply.

Discussion

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