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

# 将 Blob 转换为 DataView

[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) 类提供了多种以不同格式消费其内容的方法。先用 `.arrayBuffer()` 将内容读取到 `ArrayBuffer`，然后从该缓冲区创建一个 `DataView`。

```ts theme={null}
const blob = new Blob(["hello world"]);
const arr = new DataView(await blob.arrayBuffer());
```

***

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