Chunk data decompressing (Zlib)

This snippet shows how to decompress chunk data sent by 0x33 packet, using Zlib deflate.

Add the Zlib library by "#include " and link to it by adding -lz to the linking stage.

To use it to decompress the chunk data, you can use the following snippet:

You could also decompress the data as you get it (instead of doing it after getting the whole packet).