[Runtime
](../../../index.md)[Package Manager
](../../../pm/cli/install/index.md)[Bundler
](../../../bundler/index.md)[Test Runner
](../../../test/index.md)[Guides
](../../index.md)[Reference
](https://bun.com/reference)[Blog
](https://bun.com/blog)[Feedback
](../../../feedback/index.md)
Use 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
See Docs > API > Utils for more useful utilities.
Was this page helpful?
[
Encode and decode base64 strings
Previous
](../base64/index.md)[
Compress and decompress data with DEFLATE
Next
](../deflate/index.md)