Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit 7fbad3d

Browse files
committed
asd
1 parent 60efcc4 commit 7fbad3d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Request, Response } from 'express'
2+
import { gzipSync } from 'zlib'
3+
4+
export default (req: Request, res: Response) => {
5+
const data = 'hello world'
6+
const compressed = gzipSync(Buffer.from(data, 'utf8'))
7+
8+
res.setHeader('Content-Type', 'application/octet-stream')
9+
res.status(200).send(compressed)
10+
}

0 commit comments

Comments
 (0)