code: public static String deflate(final String data) {
          val deflater = new Deflater();
          deflater.setInput(data.getBytes(StandardCharsets.UTF_8));
          deflater.finish();
          val buffer = new byte[data.length()];
          val resultSize = deflater.deflate(buffer);
          val output = new byte[resultSize];
          System.arraycopy(buffer, 0, output, 0, resultSize);
          return EncodingUtils.encodeBase64(output);
      }
docs: Deflate the given string via a {@link java.util.zip.Deflater}.
  
  @param data the data
  @return base64 encoded string