code: public static BitSet decode(String enc) {
          byte[] fp = base64Decode(enc);
          if (fp.length < 4) {
              throw new IllegalArgumentException("Input is not a proper PubChem base64 encoded fingerprint");
          }
  
          int len = (fp[0] << 24) | (fp[1] << 16) | (fp[2] << 8) | (fp[3] & 0xff);
          if (len != FP_SIZE) {
              throw new IllegalArgumentException("Input is not a proper PubChem base64 encoded fingerprint");
          }
  
          // note the IChemObjectBuilder is passed as null because the SMARTSQueryTool
          // isn't needed when decoding
          PubchemFingerprinter pc = new PubchemFingerprinter(null);
          for (int i = 0; i < pc.m_bits.length; ++i) {
              pc.m_bits[i] = fp[i + 4];
          }
  
          BitSet ret = new BitSet(FP_SIZE);
          for (int i = 0; i < FP_SIZE; i++) {
              if (pc.isBitOn(i)) ret.set(i);
          }
          return ret;
      }
docs: Returns a fingerprint from a Base64 encoded Pubchem fingerprint.
  
  @param enc The Base64 encoded fingerprint
  @return A BitSet corresponding to the input fingerprint