# Bun Convert an ArrayBuffer to a Uint8Array

> Convert an ArrayBuffer to a Uint8Array

- **Type:** Skill
- **Install:** `agentstack add skill-jarle-bun-skills-bun-guides-binary-arraybuffer-to-typedarray`
- **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-typedarray

## Install

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

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 Uint8Array

A `Uint8Array` is a *typed array*, meaning it is a mechanism for viewing the data in an underlying `ArrayBuffer`.

```ts  theme={"theme":{"light":"github-light","dark":"dracula"}}
const buffer = new ArrayBuffer(64);
const arr = new Uint8Array(buffer);
```

***

Instances of other typed arrays can be created similarly.

```ts  theme={"theme":{"light":"github-light","dark":"dracula"}}
const buffer = new ArrayBuffer(64);

const arr1 = new Uint8Array(buffer);
const arr2 = new Uint16Array(buffer);
const arr3 = new Uint32Array(buffer);
const arr4 = new Float32Array(buffer);
const arr5 = new Float64Array(buffer);
const arr6 = new BigInt64Array(buffer);
const arr7 = new BigUint64Array(buffer);
```

***

To create a typed array 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 buffer = new ArrayBuffer(64);
const arr = new Uint8Array(buffer, 0, 16); // view first 16 bytes
```

***

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

## 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-typedarray
- 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%.
