rembrembdocs

Skip to main content

Bun home pagelight logodark logo

[Runtime

](../../../index.md)[Package Manager

](../../../pm/cli/install/index.md)[Bundler

](../../../bundler/index.md)[Test Runner

](../../../test/index.md)[Guides

](../../index.md)[Reference

](https://bun.com/reference)[Blog

](https://bun.com/blog)[Feedback

](../../../feedback/index.md)

A Uint8Array is a typed array class, meaning it is a mechanism for viewing data in an underlying ArrayBuffer. The following snippet creates a [DataView] instance over the same range of data as the Uint8Array.

const arr: Uint8Array = ...
const dv = new DataView(arr.buffer, arr.byteOffset, arr.byteLength);

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

Was this page helpful?

Suggest editsRaise issue

[

Convert a Uint8Array to a Blob

Previous

](../typedarray-to-blob/index.md)[

Convert a Uint8Array to a ReadableStream

Next

](../typedarray-to-readablestream/index.md)