W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

From: Jonas Sicking <jonas@sicking.cc>
Date: Sat, 28 Apr 2012 01:45:46 -0700
Message-ID: <CA+c2ei-v8p_yvhJ7vm5yH41JuWxw4U5XCAViC94=Z3XzM6f3ww@mail.gmail.com>
To: Arun Ranganathan <aranganathan@mozilla.com>
Cc: Anne van Kesteren <annevk@opera.com>, David Herman <dherman@mozilla.com>, Eric U <ericu@google.com>, Boris Zbarsky <bzbarsky@mit.edu>, public-webapps@w3.org
On Fri, Apr 27, 2012 at 10:57 AM, Arun Ranganathan
<aranganathan@mozilla.com> wrote:
> On Apr 27, 2012, at 1:28 AM, Anne van Kesteren wrote:
>> On Fri, 27 Apr 2012 00:13:42 +0200, Arun Ranganathan <aranganathan@mozilla.com> wrote:
>>> The constructor will switch to use ArrayBufferView in lieu of ArrayBuffer, but the read method exposed on FileReader and FileReaderSync will read files into memory as ArrayBuffers.
>> Since the constructor is not widely deployed yet would it not be better to stick to ArrayBufferView exclusively, just like XMLHttpRequest.send()?
> The Blob constructor will already use ArrayBufferView.  Above, do you mean, have a method of the sort FileReader.readAsArrayBufferView or something like that?
> *.readAsArrayBuffer is already deployed, and it might be weird to force a view on an ArrayBuffer when read into memory.

We should not have readAsArryBufferView since there's a ton of
different types of ArrayBufferViews. Instead we should just return an
ArrayBuffer and let people construct ArrayBufferViews or DataViews
into that as they see fit.

This matches what XHR does (and intends to do) I believe.

/ Jonas
Received on Saturday, 28 April 2012 08:46:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:33 UTC