Skip to main content

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 可以由多个“块”数组构造,每个块可以是字符串、二进制数据结构(包括 Uint8Array)或另一个 Blob
const arr = new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0x6f]);
const blob = new Blob([arr]);
console.log(await blob.text());
// => "hello"

请参见 文档 > API > 二进制数据 获取使用 Bun 操作二进制数据的完整文档。