Re: [whatwg] "binary" encoding

On Tue, Jun 12, 2012 at 1:45 PM, Joshua Bell <jsbell@chromium.org> wrote:

> These don't handle data streaming scenarios, however.
>

Streaming definitely belongs in the string encoding API.  The atob/btoa
interface is fine for fixed strings, but if you wedge streaming into it
you're just going to end up with the TextEncoder/TextDecoder APIs all over
again.  The only tricky bit--which has been brought up before--is that the
terms "encode" and "decode" are flipped (encoding binary into a base64
string vs. encoding a string into UTF-8).  I forget if that actually causes
any issues in the API or if it's just semantics.

Maybe nobody actually wants to decode big chunks of base64 client-side.  I
don't have any use cases for it, myself.

-- 
Glenn Maynard

Received on Tuesday, 12 June 2012 20:15:55 UTC