Blob
類別提供了許多方法,可以用於以不同格式使用其內容,包括 .stream()
。這會傳回 Promise<ReadableStream>
。
const blob = new Blob(["hello world"]);
const stream = await blob.stream();
請參閱文件 > API > 二進制資料,以取得使用 Bun 操作二進制資料的完整文件。
Blob
類別提供了許多方法,可以用於以不同格式使用其內容,包括 .stream()
。這會傳回 Promise<ReadableStream>
。
const blob = new Blob(["hello world"]);
const stream = await blob.stream();
請參閱文件 > API > 二進制資料,以取得使用 Bun 操作二進制資料的完整文件。
套件管理器
設定 git 以 diff Bun 的 lockb lockfile
在 GitHub Actions 中使用 Bun 安裝相依性
進程
讀取檔案
執行階段
串流
將 ReadableStream 轉換為 Uint8Array
將 ReadableStream 轉換為 ArrayBuffer
將 Node.js Readable 轉換為 Uint8Array
工具程式