Re: XHR responseArrayBuffer attribute: suggestion to replace "asBlob" with "responseType"

* David Flanagan wrote:
>Is this a fair summary of this thread?
>Chris (Apple) worries that having to support both responseText and 
>responseArrayBuffer will be memory inefficient because implementations 
>will end up with both representations in memory.
>James (Google) worries that synchronously reading bytes from the browser 
>cache on demand when responseArrayBuffer is accessed will be too 

In most cases you do not need to store the bytes in order to get them
back, you can just apply the character encoding scheme used to decode
the bytes to the string and you'll have the original byte string, so
long as the character encoding scheme is bijective, which is true for
most of the relevant schemes like UTF-8 and UTF-16. You'd just need a
flag that tells you when that is not possible, like with UTF-8 encoded
strings that are not-wellformed, and for encodings like UTF-7.
Björn Höhrmann · ·
Am Badedeich 7 · Telefon: +49(0)160/4415681 ·
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · 

Received on Wednesday, 10 November 2010 21:39:54 UTC