# Bun Convert an ArrayBuffer to a Buffer

> Convert an ArrayBuffer to a Buffer

- **Type:** Skill
- **Install:** `agentstack add skill-jarle-bun-skills-bun-guides-binary-arraybuffer-to-buffer`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jarle](https://agentstack.voostack.com/s/jarle)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [jarle](https://github.com/jarle)
- **Source:** https://github.com/jarle/bun-skills/tree/main/skills/bun-guides-binary-arraybuffer-to-buffer

## Install

```sh
agentstack add skill-jarle-bun-skills-bun-guides-binary-arraybuffer-to-buffer
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Convert an ArrayBuffer to a Buffer

The Node.js [`Buffer`](https://nodejs.org/api/buffer.html) API predates the introduction of `ArrayBuffer` into the JavaScript language. Bun implements both.

Use the static `Buffer.from()` method to create a `Buffer` from an `ArrayBuffer`.

```ts  theme={"theme":{"light":"github-light","dark":"dracula"}}
const arrBuffer = new ArrayBuffer(64);
const nodeBuffer = Buffer.from(arrBuffer);
```

***

To create a `Buffer` that only views a portion of the underlying buffer, pass the offset and length to the constructor.

```ts  theme={"theme":{"light":"github-light","dark":"dracula"}}
const arrBuffer = new ArrayBuffer(64);
const nodeBuffer = Buffer.from(arrBuffer, 0, 16); // view first 16 bytes
```

***

See [Docs > API > Binary Data](/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jarle](https://github.com/jarle)
- **Source:** [jarle/bun-skills](https://github.com/jarle/bun-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jarle-bun-skills-bun-guides-binary-arraybuffer-to-buffer
- Seller: https://agentstack.voostack.com/s/jarle
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
