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

# 将 ArrayBuffer 转换为 Blob

[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) 可以由一个"块"数组构造，每个块可以是字符串、二进制数据结构或另一个 `Blob`。

```ts theme={null}
const buf = new ArrayBuffer(64);
const blob = new Blob([buf]);
```

***

默认情况下，生成的 `Blob` 的 `type` 是未设置的。使用 `type` 选项进行设置。

```ts theme={null}
const buf = new ArrayBuffer(64);
const blob = new Blob([buf], { type: "application/octet-stream" });
blob.type; // => "application/octet-stream"
```

***

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