Just so you know, zlib is a library and doesn't "create .gz files". Gzip does that
The ZIP format permits many cmpalg's, of which only DEFLATE is widely used and supported.
zlib = DEFLATE (check it out).
Compiling PHP with [color=#00CC00]--enable-zip[/color] = access [color=#0000CC]addFromString()[/color], which is OP's primary goal.
Maximum Cash Discount on any plan with MAXCASH
How To Install PHP.INI / ionCube on DreamHost