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

# 将 Buffer 转换为 ArrayBuffer

Node.js 的 [`Buffer`](https://nodejs.org/api/buffer.html) 类提供了一种查看和操作底层 `ArrayBuffer` 的方式，该 `ArrayBuffer` 可通过 `buffer` 属性访问。

```ts theme={"theme":{"light":"github-light","dark":"dracula"}}
const nodeBuf = Buffer.alloc(64);
const arrBuf = nodeBuf.buffer;
```

***

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