# Bun Convert a Blob to a DataView

> Convert a Blob to a DataView

- Skill: `jarle/bun-convert-a-blob-to-a-dataview` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jarle/bun-convert-a-blob-to-a-dataview`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jarle/bun-convert-a-blob-to-a-dataview/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-convert-a-blob-to-a-dataview

---


# Convert a Blob to a DataView

The [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class provides a number of methods for consuming its contents in different formats. This snippets reads the contents to an `ArrayBuffer`, then creates a `DataView` from the buffer.

```ts  theme={"theme":{"light":"github-light","dark":"dracula"}}
const blob = new Blob(["hello world"]);
const arr = new DataView(await blob.arrayBuffer());
```

***

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

