# Bun Compress and decompress data with DEFLATE

> Compress and decompress data with DEFLATE

- Skill: `jarle/bun-compress-and-decompress-data-with-deflate` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jarle/bun-compress-and-decompress-data-with-deflate`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jarle/bun-compress-and-decompress-data-with-deflate/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: jarle (https://skillmd.com/u/jarle)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/jarle/bun-compress-and-decompress-data-with-deflate

---


# Compress and decompress data with DEFLATE

Use `Bun.deflateSync()` to compress a `Uint8Array` with 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
```

***

See [Docs > API > Utils](/runtime/utils) for more useful utilities.

