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

Boris Zbarsky bzbarsky at MIT.EDU
Mon Aug 5 18:26:57 PDT 2013


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



More information about the whatwg mailing list