> ## Documentation Index
> Fetch the complete documentation index at: https://bun.zhcndoc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 使用 DEFLATE 进行数据压缩和解压

使用 `Bun.deflateSync()` 对 `Uint8Array` 进行 DEFLATE 压缩。

```ts theme={"theme":{"light":"github-light","dark":"dracula"}}
const data = Buffer.from("Hello, world!");
const compressed = Bun.deflateSync("Hello, world!");
// => Uint8Array

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

***

更多实用工具，请参见 [文档 > API > 工具](/runtime/utils)。
