title: How to uncompress a COMPRESSED BLOB in m MYSQL_RES using zlib.h without using UNCOMPRESS in mysql query
body: <p>I store data using insert compress {hex data} into an innodb table BLOB column.  I need to programmatically select the compressed data using the mysql c api and uncompress it at the application level.  Can I do so, using zlib.h and the uncompress function or inflate/deflate method?</p>
  
  <p>I cannot use uncompress in the mysql query as it is  a large resuult set and the data is traveling over the network onto a different server.</p>
  
  <p>For example:</p>
  
  <pre><code>MYSQL_RES *results = NULL;
  MYSQL_ROW row;
  
  results = exec_query();
  while ( row = mysql_fetch_row(results) )
  {
          // row[0]  = uncompressed size
          // row[1]  = compressed size
          // row[2]  = compressed blob
  
          // does MYSQL "INSERT COMPRESS( {data} ) INTO ... " use LZ77?
          // will this work?
          // uncompress ( Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
  }
  </code></pre>