> ## Documentation Index
> Fetch the complete documentation index at: https://bun.zhcndoc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 将 Blob 转换为 ArrayBuffer

[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) 类提供了多种方法以不同格式使用其内容，其中包括 `.arrayBuffer()`。

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

***

请参见 [文档 > API > 二进制数据](/runtime/binary-data#conversion) 获取关于使用 Bun 操作二进制数据的完整文档。
