docs: public static byte[] decode(byte[] source, int offset, int len, int options) {
          if (source == null) {
              throw new IllegalArgumentException("Cannot decode null source array.");
          }
          if (offset < 0 || offset + len > source.length) {
              throw new IllegalArgumentException(String.format(
                      "Source array with length %d cannot have offset of %d and process %d bytes.",
                      source.length,
                      offset,
                      len));
          }
  
          if (len == 0) {
              return new byte[0];
          }
  
          byte[] decodabet = getDecodabet(options);
  
          int len34 = len * 3 / 4;          // Estimate on array size
          byte[] outBuff = new byte[len34]; // Upper limit on size of output
          int outBuffPosn = 0;              // Keep track of where we're writing
  
          byte[] b4 = new byte[4]; // Four byte buffer from source, eliminating white space
          int b4Posn = 0;          // Keep track of four byte input buffer
          int i;                   // Source array counter
          byte sbiDecode;          // Special value from DECODABET
  
          for (i = offset; i < offset + len; i++) {  // Loop through source
              sbiDecode = decodabet[source[i] & 0x7F];
  
              // White space, Equals sign, or legit Base64 character
              // Note the values such as -5 and -9 in the
              // DECODABETs at the top of the file.
              if (sbiDecode >= WHITE_SPACE_ENC) {
                  if (sbiDecode >= EQUALS_SIGN_ENC) {
                      b4[b4Posn++] = source[i];
                      if (b4Posn > 3) {
                          outBuffPosn += decode4to3(b4, 4, outBuff, outBuffPosn, decodabet);
                          b4Posn = 0;
                      }
                  }
              } else {
                  // There's a bad input character in the Base64 stream.
                  throw new IllegalArgumentException(String.format(
                          "Bad%s Base64 character '%s' in array position %d",
                          (decodabet == _URL_SAFE_DECODABET ? " url safe" : ""),
                          escape(source[i]),
                          i));
              }
          }
  
          if (b4Posn > 0) {
              outBuffPosn += decode4to3(b4, b4Posn, outBuff, outBuffPosn, decodabet);
          }
  
          if (outBuffPosn < outBuff.length) {
              byte[] out = new byte[outBuffPosn];
              System.arraycopy(outBuff, 0, out, 0, outBuffPosn);
              return out;
          }
          return outBuff;
      }