code: public String generateAuthnRequest(final String requestId) throws SAMLException {
          final String request = _createAuthnRequest(requestId);
          
          try {
              final byte[] compressed = deflate(request.getBytes("UTF-8"));
              return DatatypeConverter.printBase64Binary(compressed);
          } catch (UnsupportedEncodingException e) {
              throw new SAMLException("Apparently your platform lacks UTF-8.  That's too bad.", e);
          } catch (IOException e) {
              throw new SAMLException("Unable to compress the AuthnRequest", e);
          }
      }
docs: Create a new AuthnRequest suitable for sending to an HTTPRedirect binding
  endpoint on the IdP. The SPConfig will be used to fill in the ACS and
  issuer, and the IdP will be used to set the destination.
  
  @param requestId random generated RequestId
  @return a deflated, base64-encoded AuthnRequest
  @throws org.adeptnet.auth.saml.SAMLException