code: private static int decodeBase31(@Nonnull final String code) {
          int value = 0;
          for (final char c : code.toCharArray()) {
              if (c == '.') {
                  return value;
              }
              if (DECODE_CHARS[c] < 0) {
                  return -1;
              }
              value = (value * 31) + DECODE_CHARS[c];
          }
          return value;
      }
docs: returns negative in case of error