docs: public static byte[] encode(final byte[] input, final boolean urlSafeEncoding) {
  		final int lenInput = input.length;
  		final int lenOutput = roundOut(lenInput * 8, BITS_PER_B64_BYTE);
  		final int padding = (urlSafeEncoding ? 0 : paddingOut(lenOutput, BYTES_PER_BLOCK_OF_6_BITS));
  		final byte[] output = new byte[lenOutput + padding];
  		final byte[] transTable = (urlSafeEncoding ? ENCODE_TABLE_URL_SAFE : ENCODE_TABLE_STD);
  		for (int i = 0, j = 0; i < lenInput; i += BYTES_PER_BLOCK_OF_8_BITS) {
  			final int b1 = getByte(input, i);
  			final int b2 = getByte(input, i + 1);
  			final int b3 = getByte(input, i + 2);
  			final long block = (b1 << 16 | b2 << 8 | b3) & 0x00FFFFFF;
  			setByte(output, j++, lenOutput, transTable[(int) ((block >> 18) & 0x3F)]);
  			setByte(output, j++, lenOutput, transTable[(int) ((block >> 12) & 0x3F)]);
  			setByte(output, j++, lenOutput, transTable[(int) ((block >> 6) & 0x3F)]);
  			setByte(output, j++, lenOutput, transTable[(int) (block & 0x3F)]);
  		}
  		if (padding > 0) {
  			int j = output.length - padding;
  			while (j < output.length) {
  				output[j++] = (byte) PADDING_CHAR_STD;
  			}
  		}
  		return output;
  	}