Re: [XHR2] ArrayBuffer support added

On Mon, 31 Jan 2011 18:27:51 +0100, Charles Pritchard <chuck@visc.us>  
wrote:
> 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...);

I hope we can actually just do this by exposing "blob" earlier than DONE  
in due course. With the Blob object on disk growing over time. If you  
really just want to stream data I think we should use EventSource for that.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Tuesday, 1 February 2011 09:55:49 UTC