I am going over the permessage-deflate rfc and I don't understand the part about 'sharing LZ77 Sliding window' (section 7.2.3.2.)
It says that If the "agreed parameters" did not contain the "client_no_context_takeover" extension parameter, the client can compress the payload of the next message into less bytes by referencing the history in the LZ77 sliding window.
How will the server know if the client used the same sliding window or used a new one? How will the server decompress the message? How can I use Zlib(or any other lib) to compress/decompress a message like this?