[whatwg] API for encoding/decoding ArrayBuffers into text
bzbarsky at MIT.EDU
Fri Mar 16 16:19:13 PDT 2012
On 3/16/12 5:44 PM, Charles Pritchard wrote:
> The DataView set of methods already does this work. The raw arrays are
> supposed to have platform endianness.
I haven't seen anyone actually using the DataView stuff in practice, or
presenting it to developers much...
> If you see some evangelists skipping the endian check, send them an
> e-mail and let them know.
I've done that... then I stopped because it just wasn't worth the
effort. Every single WebGL demo I've seen recently was doing this.
People were being told that typed arrays are a good way to load binary
(integer and float) data from servers using the arraybuffer facilities
of XHR at SXSW last week, with no mention of endianness.
I think that trying to get web developers to do this right is a lost
cause, esp. because none of them (to a good approximation) have any
big-endian systems to test on.
More information about the whatwg