Artifact
c3e526e95887fb6026042497c100145bcb4e261d:
Wiki page
[(data base64)] by
murphy
2016-05-21 12:07:22.
0000: 44 20 32 30 31 36 2d 30 35 2d 32 31 54 31 32 3a D 2016-05-21T12:
0010: 30 37 3a 32 32 2e 30 37 30 0a 4c 20 28 64 61 74 07:22.070.L (dat
0020: 61 5c 73 62 61 73 65 36 34 29 0a 50 20 65 66 65 a\sbase64).P efe
0030: 35 37 32 62 64 62 39 66 32 30 31 64 38 36 36 33 572bdb9f201d8663
0040: 35 31 61 33 31 34 38 66 65 30 32 63 62 62 31 64 51a3148fe02cbb1d
0050: 35 61 61 32 65 0a 55 20 6d 75 72 70 68 79 0a 57 5aa2e.U murphy.W
0060: 20 31 31 37 38 0a 3c 68 31 3e 42 61 73 65 36 34 1178.<h1>Base64
0070: 20 45 6e 63 6f 64 69 6e 67 3c 2f 68 31 3e 0d 0a Encoding</h1>..
0080: 0d 0a 3c 68 32 3e 53 79 6e 6f 70 73 69 73 3c 2f ..<h2>Synopsis</
0090: 68 32 3e 0d 0a 0d 0a 3c 63 6f 64 65 3e 28 69 6d h2>....<code>(im
00a0: 70 6f 72 74 20 28 64 61 74 61 20 62 61 73 65 36 port (data base6
00b0: 34 29 29 3c 2f 63 6f 64 65 3e 0d 0a 0d 0a 45 6e 4))</code>....En
00c0: 63 6f 64 69 6e 67 20 61 6e 64 20 64 65 63 6f 64 coding and decod
00d0: 69 6e 67 20 6f 66 20 62 69 6e 61 72 79 20 64 61 ing of binary da
00e0: 74 61 20 69 6e 20 5b 68 74 74 70 73 3a 2f 2f 65 ta in [https://e
00f0: 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f n.wikipedia.org/
0100: 77 69 6b 69 2f 42 61 73 65 36 34 7c 42 61 73 65 wiki/Base64|Base
0110: 36 34 5d 20 66 6f 72 6d 61 74 2e 0d 0a 0d 0a 3c 64] format.....<
0120: 68 32 3e 4f 70 74 69 6f 6e 73 3c 2f 68 32 3e 0d h2>Options</h2>.
0130: 0a 0d 0a 3c 68 33 3e 73 79 6e 74 61 78 3a 20 3c ...<h3>syntax: <
0140: 63 6f 64 65 3e 28 62 61 73 65 36 34 2d 6f 70 74 code>(base64-opt
0150: 69 6f 6e 20 3c 69 3e 73 79 6d 62 6f 6c 3c 2f 69 ion <i>symbol</i
0160: 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a >)</code></h3>..
0170: 3c 68 33 3e 73 79 6e 74 61 78 3a 20 3c 63 6f 64 <h3>syntax: <cod
0180: 65 3e 28 62 61 73 65 36 34 2d 6f 70 74 69 6f 6e e>(base64-option
0190: 73 20 3c 69 3e 73 79 6d 62 6f 6c 3c 2f 69 3e 20 s <i>symbol</i>
01a0: 2e 2e 2e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e ...)</code></h3>
01b0: 0d 0a 0d 0a 54 68 65 20 65 6e 75 6d 65 72 61 74 ....The enumerat
01c0: 69 6f 6e 20 68 61 73 20 74 68 65 20 6d 65 6d 62 ion has the memb
01d0: 65 72 73 20 3c 74 74 3e 75 72 69 2d 73 61 66 65 ers <tt>uri-safe
01e0: 3c 2f 74 74 3e 20 61 6e 64 20 3c 74 74 3e 70 61 </tt> and <tt>pa
01f0: 64 64 69 6e 67 3c 2f 74 74 3e 2e 0d 0a 0d 0a 3c dding</tt>.....<
0200: 68 32 3e 4f 70 65 72 61 74 69 6f 6e 73 3c 2f 68 h2>Operations</h
0210: 32 3e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 2>....<h3>proced
0220: 75 72 65 3a 20 3c 63 6f 64 65 3e 28 62 61 73 65 ure: <code>(base
0230: 36 34 2d 65 6e 63 6f 64 65 20 3c 69 3e 62 79 74 64-encode <i>byt
0240: 65 76 65 63 74 6f 72 3c 2f 69 3e 29 3c 2f 63 6f evector</i>)</co
0250: 64 65 3e 3c 2f 68 33 3e 0d 0a 3c 68 33 3e 70 72 de></h3>..<h3>pr
0260: 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64 65 3e 28 ocedure: <code>(
0270: 62 61 73 65 36 34 2d 65 6e 63 6f 64 65 20 3c 69 base64-encode <i
0280: 3e 62 79 74 65 76 65 63 74 6f 72 3c 2f 69 3e 20 >bytevector</i>
0290: 3c 69 3e 6f 70 74 69 6f 6e 73 3c 2f 69 3e 29 3c <i>options</i>)<
02a0: 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a 45 /code></h3>....E
02b0: 6e 63 6f 64 65 73 20 74 68 65 20 67 69 76 65 6e ncodes the given
02c0: 20 62 79 74 65 76 65 63 74 6f 72 20 69 6e 74 6f bytevector into
02d0: 20 61 20 73 74 72 69 6e 67 2e 20 57 69 74 68 6f a string. Witho
02e0: 75 74 20 6f 70 74 69 6f 6e 73 2c 20 74 68 65 20 ut options, the
02f0: 72 65 73 75 6c 74 20 68 61 73 20 6e 6f 20 70 61 result has no pa
0300: 64 64 69 6e 67 20 61 6e 64 20 75 73 65 73 20 74 dding and uses t
0310: 68 65 20 64 65 66 61 75 6c 74 20 42 61 73 65 36 he default Base6
0320: 34 20 61 6c 70 68 61 62 65 74 2e 20 57 69 74 68 4 alphabet. With
0330: 20 74 68 65 20 3c 74 74 3e 75 72 69 2d 73 61 66 the <tt>uri-saf
0340: 65 3c 2f 74 74 3e 20 6f 70 74 69 6f 6e 2c 20 74 e</tt> option, t
0350: 68 65 20 63 68 61 72 61 63 74 65 72 73 20 22 2d he characters "-
0360: 22 20 61 6e 64 20 22 5f 22 20 72 65 70 6c 61 63 " and "_" replac
0370: 65 20 22 2b 22 20 61 6e 64 20 22 2f 22 20 69 6e e "+" and "/" in
0380: 20 74 68 65 20 61 6c 70 68 61 62 65 74 2e 20 57 the alphabet. W
0390: 69 74 68 20 74 68 65 20 3c 74 74 3e 70 61 64 64 ith the <tt>padd
03a0: 69 6e 67 3c 2f 74 74 3e 20 6f 70 74 69 6f 6e 2c ing</tt> option,
03b0: 20 74 68 65 20 6f 75 74 70 75 74 20 6d 61 79 20 the output may
03c0: 62 65 20 74 65 72 6d 69 6e 61 74 65 64 20 62 79 be terminated by
03d0: 20 22 3d 22 20 63 68 61 72 61 63 74 65 72 73 20 "=" characters
03e0: 75 6e 6c 65 73 73 20 74 68 65 20 69 6e 70 75 74 unless the input
03f0: 20 6c 65 6e 67 74 68 20 69 73 20 61 20 6d 75 6c length is a mul
0400: 74 69 70 6c 65 20 6f 66 20 74 68 72 65 65 2e 0d tiple of three..
0410: 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75 72 65 ...<h3>procedure
0420: 3a 20 3c 63 6f 64 65 3e 28 62 61 73 65 36 34 2d : <code>(base64-
0430: 65 6e 63 6f 64 65 20 3c 69 3e 73 74 72 69 6e 67 encode <i>string
0440: 3c 2f 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 </i>)</code></h3
0450: 3e 0d 0a 0d 0a 44 65 63 6f 64 65 73 20 74 68 65 >....Decodes the
0460: 20 67 69 76 65 6e 20 73 74 72 69 6e 67 20 69 6e given string in
0470: 74 6f 20 61 20 62 79 74 65 76 65 63 74 6f 72 2e to a bytevector.
0480: 20 41 63 63 65 70 74 73 20 65 6e 63 6f 64 69 6e Accepts encodin
0490: 67 73 20 69 6e 20 74 68 65 20 73 74 61 6e 64 61 gs in the standa
04a0: 72 64 20 6f 72 20 75 72 69 2d 73 61 66 65 20 61 rd or uri-safe a
04b0: 6c 70 68 61 62 65 74 73 20 61 6e 64 20 69 67 6e lphabets and ign
04c0: 6f 72 65 73 20 61 6e 79 20 6e 75 6d 62 65 72 20 ores any number
04d0: 6f 66 20 70 61 64 64 69 6e 67 20 63 68 61 72 61 of padding chara
04e0: 63 74 65 72 73 20 61 74 20 74 68 65 20 65 6e 64 cters at the end
04f0: 20 6f 66 20 74 68 65 20 69 6e 70 75 74 2e 0d 0a of the input...
0500: 0a 5a 20 66 33 32 36 32 31 65 65 31 37 32 37 63 .Z f32621ee1727c
0510: 62 32 63 33 32 30 66 30 30 38 31 35 64 30 63 37 b2c320f00815d0c7
0520: 66 33 61 0a f3a.