W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: [XHR2] ArrayBuffer support added

From: Charles Pritchard <chuck@visc.us>
Date: Mon, 31 Jan 2011 09:27:51 -0800
Message-ID: <4D46F117.7060309@visc.us>
To: Anne van Kesteren <annevk@opera.com>
CC: WebApps WG <public-webapps@w3.org>
On 1/31/2011 1:17 AM, Anne van Kesteren wrote:
> I somehow missed that a request to add back ArrayBuffer support was 
> offlist. Since quite a few specifications are using it now and TC 39 
> has shown no progress on developing an alternative I was convinced to 
> add it back in. The responseType value is "arraybuffer". This adds a 
> dependency to the Typed Array specification developed at Khronos.
>
> http://dev.w3.org/2006/webapi/XMLHttpRequest-2/

While on that topic, it'd be nice to see a fixed-size ArrayBuffer,
for working with streams and large-files.

Currently: blob requires the entire file be downloaded before use,
classically, the stream could be ready while downloading, and the final
response just 'tossed' (when the stream is complete).

Even a hard-coded array buffer size would be helpful (though it'd be 
nice to have that as a settable value):

Something along these lines would allow processing of binary data 
without requiring
the entire stream to be loaded into memory / downloaded.

xhr.responseType='stream'
xhr.buffer = new ArrayBuffer(...len...);


-Charles
Received on Monday, 31 January 2011 17:28:23 GMT

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