Skip to content

Используйте Bun.gzipSync() для сжатия Uint8Array с gzip.

ts
const data = Buffer.from("Hello, world!");
const compressed = Bun.gzipSync(data);
// => Uint8Array

const decompressed = Bun.gunzipSync(compressed);
// => Uint8Array

Смотрите Документация > API > Утилиты для других полезных утилит.

Bun от www.bunjs.com.cn