W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2012

Re: [whatwg] "binary" encoding

From: Glenn Maynard <glenn@zewt.org>
Date: Tue, 12 Jun 2012 15:15:21 -0500
Message-ID: <CABirCh_baW8PRUH3uDX7dMj7g66ip1Wvc_O0GSvhiisHKDEv2g@mail.gmail.com>
To: Joshua Bell <jsbell@chromium.org>
Cc: WHATWG <whatwg@whatwg.org>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:43 UTC