Bun.gzipSync()
to compress a Uint8Array
with gzip.
See Docs > API > Utils for more useful utilities.
Bun.gzipSync()
to compress a Uint8Array
with gzip.
const data = Buffer.from('Hello, world!');
const compressed = Bun.gzipSync(data);
// => Uint8Array
const decompressed = Bun.gunzipSync(compressed);
// => Uint8Array
Was this page helpful?