def _char_to_unsigned_int(char):
    """
    Convert an ASCII character to an integer 0-63
    """
    i = ord(char)
    if i >= 97 and i <= 122:
        return i - 97
    if i >= 65 and i <= 90:
        return i - 39
    if i >= 48 and i <= 57:
        return i + 4
    if i == 43:
        return 62
    return 63
