View/Edit #29:Base64

Switch to edit mode.

Name(s): Base64
1:  {string} = args
2:  nums = decode_binary(string, "Fully")
3:  out = ""
4:  while (nums)
5:    bignum = nums[1] * 65536 + `nums[2] ! E_RANGE => 0' * 256 + `nums[3] ! E_RANGE => 0'
6:    quad = {bignum / 262144}
7:    bignum = bignum % 262144
8:    quad = {@quad, bignum / 4096}
9:    if (length(nums) >= 2)
10:     bignum = bignum % 4096
11:     quad = {@quad, bignum / 64}
12:     if (length(nums) >= 3)
13:       bignum = bignum % 64
14:       quad = {@quad, bignum}
15:     else
16:       quad = {@quad, 64}
17:     endif
18:   else
19:     quad = {@quad, 64, 64}
20:   endif
21:   for x in (quad)
22:     out = out + this.base64_table[x + 1]
23:   endfor
24:   nums[0..3] = {}
25:   $command_utils:suspend_if_needed()
26: endwhile
27: return out
28: "Last modified by manta (#7165) on Mon Feb 26 08:41:20 2001 MST."
29: "This verb previously owned by manta (#7165), and chowned to $slacker upon dewizarding (Sat Aug 17 14:50:04 2002 MDT)."
30: "Last modified by Dax (#789) on Sat Aug 17 14:50:04 2002 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Slacker (#55)

You are not logged in.

[home | help | who | search | setup | code]