本页还没有译文
本页 4 段还没译成Español,下面显示的是英文原文。Convert a Blob to a Uint8Array
还没翻译译自英文(bun.com)本页 4 段都还没译
The Blob class provides several methods for consuming its contents in different formats. Use .bytes() to read the contents as a Uint8Array.
const blob = new Blob(["hello world"]);
const arr = await blob.bytes();Alternatively, read the contents into an ArrayBuffer with .arrayBuffer(), then create a Uint8Array from the buffer.
const blob = new Blob(["hello world"]);
const arr = new Uint8Array(await blob.arrayBuffer());See Binary Data.
AI 翻译查看英文原文