Skip to content

Verwenden Sie Bun.deflateSync(), um eine Uint8Array mit DEFLATE zu komprimieren.

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

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

Siehe Docs > API > Utils für weitere nützliche Utilities.

Bun von www.bunjs.com.cn bearbeitet