code: public final byte[] decode(String in) {
  
          // sanitize the parameters
          if (in == null) {
              throw new NullPointerException();
          }
  
          // create the result buffer
          byte[] out = new byte[in.length() * bits / 8];
  
          // decode
          int outCount = 0; // number of output bytes produced
          int inCount = 0; // number of input characters consumed
          int buf = 0; // buffer of input bits not yet sent to output
          int bufBits = 0; // number of bits in the bit buffer
          while (inCount < in.length()) {
              int next = in.codePointAt(inCount);
              inCount++;
              if (next < min || next > max) {
                  continue;
              }
              next = values[next - min];
              if (next == -1) {
                  continue;
              }
              buf = (buf << bits) | next;
              bufBits += bits;
              while (bufBits >= 8) {
                  out[outCount] = (byte) ((buf >>> (bufBits - 8)) & 0xff);
                  bufBits -= 8;
                  outCount++;
              }
          }
  
          // trim the result if there were any skipped characters
          if (outCount < out.length) {
              byte[] tmp = out;
              out = new byte[outCount];
              System.arraycopy(tmp, 0, out, 0, outCount);
          }
          return out;
      }
docs: Decodes the given base-X string into bytes, silently ignoring any
  non-base-X characters.
  
  @param in
  the string to decode.
  
  @return The decoded bytes.