Blob 类提供了许多以不同格式使用其内容的方法,包括 .stream()。此方法返回 Promise<ReadableStream>。
const blob = new Blob(["hello world"]);
const stream = await blob.stream();
有关使用 Bun 操作二进制数据的完整文档,请参阅 文档 > API > 二进制数据。
Blob 类提供了许多以不同格式使用其内容的方法,包括 .stream()。此方法返回 Promise<ReadableStream>。
const blob = new Blob(["hello world"]);
const stream = await blob.stream();
有关使用 Bun 操作二进制数据的完整文档,请参阅 文档 > API > 二进制数据。
HTTP
包管理器
将 bun install 与 Artifactory 一起使用
配置 Git 以 diff Bun 的 lockb lockfile
读取文件
运行时
流
将 ReadableStream 转换为 Uint8Array
将 ReadableStream 转换为 ArrayBuffer
将 Node.js Readable 转换为 Uint8Array
实用程序