- From: Jonas Sicking <jonas@sicking.cc>
- Date: Wed, 10 Nov 2010 14:04:02 -0800
- 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 UTC