daily pastebin goal
2%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // z85 alphabet - doesn't include ', ", \
  2. const alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#";
  3. const base = alphabet.length;
  4. const base85 = input => {
  5.   const result = [];
  6.   do {
  7.     const remainder = input % base;
  8.     input = ~~(input / base);
  9.     result.push(alphabet[remainder]);
  10.   } while (input != 0);
  11.   return result.reverse().join("");
  12. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top