Используйте Bun.gzipSync() для сжатия Uint8Array с gzip.
ts
const data = Buffer.from("Hello, world!");
const compressed = Bun.gzipSync(data);
// => Uint8Array
const decompressed = Bun.gunzipSync(compressed);
// => Uint8ArrayСмотрите Документация > API > Утилиты для других полезных утилит.