Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: How to load binary image with Javascript with NO BASE64 conversion Date: Tue, 29 Jul 2014 13:51:13 +0200 Organization: PointedEars Software (PES) Lines: 29 Message-ID: <4178133.se5FDmHEIz@PointedEars.de> References: <53d61001$0$2845$e4fe514c@news2.news.xs4all.nl> <2277857.S6fZp3vA54@PointedEars.de> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1406634678 21722 eJwFwQEBACAIA7BKCPxKHa70j+CG4KJ2EkwM5mSDNa/npgAXfd+AdbjJ6z5JJ8ZquqmlDyVwEcE= (29 Jul 2014 11:51:18 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Tue, 29 Jul 2014 11:51:18 +0000 (UTC) User-Agent: KNode/4.12.4 X-User-ID: eJwFwQkBwDAIA0BL5UkAOR0F/xJ2B6Owwwk6FrsnHfIxrCtNTbc6bgp3X090jOxkPWmN3itFRR1iwqGu8gNK6hTv Cancel-Lock: sha1:evzpUkrH03uutlreNtA+VAByXaM= X-NNTP-Posting-Host: eJwFwYEBwDAEBMCV8g2PcRD2H6F3egm2CZWiq3u68OHC82lbxcA294lF1EA86R7jDD2C4PkBG/IQhw== Xref: csiph.com comp.lang.javascript:25589 Thomas 'PointedEars' Lahn wrote: > Erwin Moller wrote: >> On 7/27/2014 11:03 AM, Richard Maher wrote: >>> On 7/27/2014 3:44 PM, Evertjan. wrote: >>>> What is btoa(), surely not native JS? > > btoa() (presumably, “*b*inary *to* ‘a’-for-character”) is a method of the > host object referred to by the host-defined “window” property of the > ECMAScript global object, originating from DOM Level 0, for base64 > encoding; it takes a String value (object or primitive) and returns a > primitive string value. window.atob() is its decoding counterpart. For > historical reasons, it is available at least in Gecko-based and WebKit- > based browsers (I have not tested others yet). > > […] > > It turned out that, at least in Google V8 JavaScript in Chromium 34, btoa() and atob() are properties of the global object as well, so I will add testcases to the ES Matrix. It would be good to know that the major ECMAScript implementations include a base64 encoder/decoder. -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not Cc: me. / Bitte keine Kopien per E-Mail.