<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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'))