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

# 将 Uint8Array 转换为 Buffer

[`Buffer`](https://nodejs.org/api/buffer.html) 类继承自 [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) 并增加了额外的方法。使用 `Buffer.from()` 从 `Uint8Array` 创建 `Buffer` 实例。

```ts theme={null}
const arr: Uint8Array = ...
const buf = Buffer.from(arr);
```

***

参见 [二进制数据](/runtime/binary-data#conversion)。
