def deflate_and_encode(plantuml_text):
    """zlib compress the plantuml text and encode it for the plantuml server.
    """
    zlibbed_str = zlib.compress(plantuml_text.encode('utf-8'))
    compressed_string = zlibbed_str[2:-4]
    return encode(compressed_string.decode('latin-1'))
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' ) )
zlib compress the plantuml text and encode it for the plantuml server.