code: def deflate_and_encode(plantuml_text):
      
      zlibbed_str = zlib.compress(plantuml_text.encode('utf-8'))
      compressed_string = zlibbed_str[2:-4]
      return encode(compressed_string.decode('latin-1'))
docs: zlib compress the plantuml text and encode it for the plantuml server.