static String toDeflatedBase64(SAMLObject message) {
        requireNonNull(message, "message");

        final String messageStr;
        try {
            messageStr = nodeToString(XMLObjectSupport.marshall(message));
        } catch (MarshallingException e) {
            throw new SamlException("failed to serialize a SAML message", e);
        }

        final ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
        try (DeflaterOutputStream deflaterStream =
                     new DeflaterOutputStream(Base64.getEncoder().wrap(bytesOut),
                                              new Deflater(Deflater.DEFLATED, true))) {
            deflaterStream.write(messageStr.getBytes(StandardCharsets.UTF_8));
        } catch (IOException e) {
            throw new SamlException("failed to deflate a SAML message", e);
        }
        return bytesOut.toString();
    }
Encodes the specified {@code message} into a deflated base64 string.
saml/src/main/java/com/linecorp/armeria/server/saml/HttpRedirectBindingUtil.java