No special treatment how to install zlib in OS Lion or Linux. In Macintosh, you can install them via Fink, but i prefer not to do that to make sure where the library of zlib goes. Even zlib for Mac OS X is already included as part of Mac OS X
1. Download the source code here. I used zlib1.2.5 version.
2. tar xzf zlib-1.2.5.tar.gz
3. cd zlib-1.2.5
4. ./configure –prefix=/usr/local
6. make install