使用 Bun.gzipSync() 用 gzip 壓縮 Uint8Array。
ts
const data = Buffer.from("Hello, world!");
const compressed = Bun.gzipSync(data);
// => Uint8Array
const decompressed = Bun.gunzipSync(compressed);
// => Uint8Array請參閱 文檔 > API > Utils 獲取更多有用的工具函數。