Skip to content

The Node.js Buffer class extends Uint8Array, so no conversion is needed. All properties and methods on Uint8Array are available on Buffer.

ts
const buf = Buffer.alloc(64);
buf instanceof Uint8Array; // => true

See Docs > API > Binary Data for complete documentation on manipulating binary data with Bun.

Bun by www.bunjs.com.cn edit