W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2010

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

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 10 Nov 2010 14:04:02 -0800
Message-ID: <AANLkTik7QHaBnVpTS_Ym04DC+L=9HMnVHhY0HPyYgKXk@mail.gmail.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: David Flanagan <david@davidflanagan.com>, public-webapps@w3.org
On Wed, Nov 10, 2010 at 1:39 PM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
> * 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
>>time-inefficient.
>
> 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.

It's not true for UTF-8/UTF-16 if the original streams contain illegal
surrogates, right? We usually convert those to the replacement
character in firefox, which is an information destroying operation.
(I'm not sure if the stream converters do this, but they should)

/ Jonas
Received on Wednesday, 10 November 2010 22:04:51 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:41 GMT