Stream compression

i’'m trying to compress data stream using zlib. is there any wayin which i can combine all the header information(of all chunks) into a single main header in the compressed file?