For those who would prefer to install an RPM instead of tarball for zlib, you can download zlib 1.2.3 Source RPM from the following (it's the Fedora development page but you will recompile it for CentOS):
Find the latest "zlib" package. At the time of this writing it is zlib-1.2.3-1.2.1.src.rpm. Then issue "rpmbuild --rebuild" on the SRPM to compile it for CentOS. This will write two RPMs into /usr/src/redhat/RPMS/i386 (the final directory may be different depending on your arch). Simply "rpm -Uvh" the applicable RPM that is created.
So to summarize:
rpmbuild --rebuild zlib-1.2.3-1.2.1.src.rpm
rpm -Uvh /usr/src/redhat/RPMS/i386/zlib-1.2.3-1.2.1.i386.rpm
rpm -Uvh /usr/src/redhat/RPMS/i386/zlib-devel-1.2.3-1.2.1.i386.rpm