Skip to main content

Convert a Uint8Array to a Blob

还没翻译译自英文(bun.com)本页 3 段都还没译

You can construct a Blob from an array of "chunks", where each chunk is a string, binary data structure (including Uint8Array), or another Blob.

const arr = new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0x6f]);
const blob = new Blob([arr]);
console.log(await blob.text());
// => "hello"

See Binary Data.

번역 © 2026 fanyi.dev · 원문 © 2026 the Bun project (LICENSE.md names no copyright holder) (MIT)