def use_compression(self, compress=True):
if compress:<EOL><INDENT>self._preferred_compression = ("<STR_LIT>", "<STR_LIT>", "<STR_LIT:none>")<EOL><DEDENT>else:<EOL><INDENT>self._preferred_compression = ("<STR_LIT:none>",)<EOL><DEDENT>
Turn on/off compression.  This will only have an affect before starting
the transport (ie before calling `connect`, etc).  By default,
compression is off since it negatively affects interactive sessions.

:param bool compress:
    ``True`` to ask the remote client/server to compress traffic;
    ``False`` to refuse compression

.. versionadded:: 1.5.2