[whatwg] "binary" encoding

Glenn Maynard glenn at zewt.org
Tue Jun 12 13:15:21 PDT 2012


On Tue, Jun 12, 2012 at 1:45 PM, Joshua Bell <jsbell at 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



More information about the whatwg mailing list