ArrayBuffer
JS object used to represent a generic raw binary data.
You cannot directly manipulate the contents of an ArrayBuffer
.
Instead, you need to create one of the typed array objects
or a DataView object
which represents the buffer
in a specific format.
You can also get an array buffer from existing data, for example, from a Base64
string or from a local file
.
const buffer = new ArrayBuffer(8); // buffer const view = new Int32Array(buffer); // creating a typed array view of the buffer