Blob 类提供了多种方法来消费其内容,包括 .text()。
ts
const blob = new Blob(["hello world"]);
const str = await blob.text();
// => "hello world"有关使用 Bun 操作二进制数据的完整文档,请参阅 文档 > API > 二进制数据。