Skip to content

Usa Bun.deflateSync() per comprimere un Uint8Array con DEFLATE.

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

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

Vedi Docs > API > Utils per altre utilità utili.

Bun a cura di www.bunjs.com.cn