Skip to content

Instantly share code, notes, and snippets.

@aemkei
Forked from arturh/LICENSE.txt
Created May 24, 2011 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aemkei/988781 to your computer and use it in GitHub Desktop.
Save aemkei/988781 to your computer and use it in GitHub Desktop.
140byt.es - Base64 encoder
@bytespider
Copy link

function(a,b,c,d,e,f,g){for(g=c=e="";(d=a.charCodeAt(g))&&(c+=/.{8}$/(1e7+d.toString(2))),f=c.substr(g++*6,6);)e+=b[parseInt(f,2)];return e}
is 140bytes

@jed
Copy link

jed commented May 24, 2011

Nice work, gentlemen! The final entry needs to be forked from the master gist.

(Also, not to rain on anything, but that RegExp call isn't going to work in IE...)

@arturh
Copy link

arturh commented May 24, 2011

Here's me again in my rule bending mode: The only real JavaScript (per trademark) is Mozilla's. IE is JScript/Ecmascript, not Javascript. So the regex is ok.

@aemkei
Copy link
Author

aemkei commented May 24, 2011

Okay, cool!

I moved the code to https://gist.github.com/989006

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment