this simple gist gives you a gist of how to use zlib, the code was originally from https://bobobobo.wordpress.com/ but i had to convert it to be compile-able on almost every machine including windows.
- Compile:
gcc -o zlib-howto main.c --std=c99 -lz
- Run:
./zlib-howto
orzlib-howto.exe
(on windows)
make sure you have zlib installed.
- Arch & Derivatives:
pacman -S zlib
- Debian & Derivatives:
sudo apt-get install zlib1g zlib1g-dev