W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2013

Re: [whatwg] BinaryEncoding for Typed Arrays using window.btoa and window.atob

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 05 Aug 2013 21:26:57 -0400
Message-ID: <520050E1.5020409@mit.edu>
To: whatwg@lists.whatwg.org
On 8/5/13 9:15 PM, Chang Shu wrote:
> I think the atob implementation is able to enlarge the buffer size
> from c++ side if necessary.

No, it's not.  ArrayBuffer sizes are immutable.

> the algorithm first decodes base64 string into a binary string and
> casts/copies it into the desired type based on the input
> ArrayBufferView.

Does it cast or copy?  That is, does it do the moral equivalent of 
memcpy, or the moral equivalent of a for loop setting a[i] = b[i]?

-Boris
Received on Tuesday, 6 August 2013 01:27:23 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:23 UTC