--- /dev/null
+#include <stdio.h>
+
+long a64l(const char *s)
+{
+ uint32_t n = 0;
+ const char *se = s + 6;
+ while(*s && s < se) {
+ n <<= 6;
+ if (*s == '.')
+ n++;
+ if (*s >= '0' && *s <= '9')
+ n += *s - '0' + 2;
+ else if (*s >= 'A' && *s <= 'Z')
+ n += *s - 'A' + 12;
+ else
+ n += *s - 'a' + 38;
+ s++;
+ }
+ return n;
+}
--- /dev/null
+#include <stdio.h>
+
+static char buf[7];
+
+static char str[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+
+char *l64a(long l)
+{
+ uint32_t n = l;
+ char *p = buf;
+
+ while(n && p < buf + 6) {
+ *p++ = str[n & 63];
+ n >>= 6;
+ }
+ *p = 0;
+ return buf;
+}
+
+
\ No newline at end of file