zlibCompress()
Input: datain (byte buffer with input data)
nin (number of bytes of input data)
&nout (<return> number of bytes of output data)
Return: dataout (compressed data), or null on error
Notes: (1) We repeatedly read in and fill up an input buffer, compress the data, and read it back out. zlib uses two byte buffers internally in the z_stream data structure. We use the bbuffers to feed data into the fixed bufferin, and feed it out of bufferout, in the same way that a pair of streams would normally be used if the data were being read from one file and written to another. This is done iteratively, compressing L_BUF_SIZE bytes of input data at a time.