'Converts a websocket agreed_parameters set to keyword arguments
for our compressor objects.'

def _get_compressor_options(self, side, agreed_parameters, compression_options=None):

    options = dict(persistent=((side + '_no_context_takeover') not in agreed_parameters))
    wbits_header = agreed_parameters.get((side + '_max_window_bits'), None)
    if (wbits_header is None):
        options['max_wbits'] = zlib.MAX_WBITS
    else:
        options['max_wbits'] = int(wbits_header)
    options['compression_options'] = compression_options
    return options
