c++ - How to uncompress a COMPRESSED BLOB in m MYSQL_RES using zlib.h without using UNCOMPRESS in mysql query -


I store data using the compound {hex data} to be inserted into an inbox table blob column. I need to use mysql c api as a programmed compressed data and it must be unprinted at the application level. Can I do this using zlib.h and uncompress press function or flicket / deflate method?

I can not use uncompression in mysql query because it has a large resuult set and a different server is traveling on the data network.

For example:

  MYSQL_RES * results = null; MYSQL_ROW line; Results = exec_query (); While (line = mysql_fetch_row (result)) {// line [0] = uncompressed size // line [1] = compressed size // line [2] = compressed blob / / MYSQL "INSERT COMPRESS ({data}) In ... "Use LZ77? // it will work? // uncompress (Bytef * Dest, ULong * Distillan, Constant Bytef * Source, ULong SourceLen)}  

I do not know that you are doing it right and I do not understand what you want.

In fact, Blob is used for binary data such as images, video etc.

So you store them by bytes and retrieve it.

In addition here you want to compress.

So, compress the byte and the store. When recovering it without uncompression

Sample Example:

  Unpression in the form of sample (short ('Hello World'));  

enter image details here

this Tutorials How to Insert Pictures Using MySQL CAPs in MySQL DB


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -