Please enable JavaScript.
Coggle requires JavaScript to display documents.
ArrayBuffer - Coggle Diagram
ArrayBuffer
-
-
Flow
-
Create DataView to be able access/set whole buffer
let dv1 = new DataView(buffer)Or create TypedArray
const typedArray1 = new Int8Array(buffer)
Manipulate data
dv1.setInt8(11, 42)
The ArrayBuffer id used to represent a generic, fixed-length raw binary data buffer.
-
-
DataView
DataView is great when we store mixed-format data in the same buffer. E.g we store a sequence of pairs (16-bit integer, 32-bit float). Then DataView allows to access them easily.
TypedArray
TypedArray has regular Array methods, with notable exceptions.
We can iterate, map, slice, find, reduce etc.