DataView abstraction, which lets you perform typed accesses on an array buffer of memory, such as one obtained from an
To begin, you need your data in an
ArrayBuffer, such as the one returned by the
XMLHttpRequest object. With this, you can create a
DataView, and then using that
DataArray, create a typed array over the data view to extract just the bytes that you're interested in. Let's see an example.
Here's a simple example:
var req = new XMLHttpRequest(); req.open("GET", url, true); req.responseType = "arraybuffer"; req.onreadystatechange = function ...