0

I have a program which converts file to blob in sqlite database. It uses QT framework. I can normally save the file from the database but only through its GUI (which is really painful). I want to be able to decode the blob in sqlite to the original file. I have attached the original and encoded file here link (click download button) It is likely using qtarray and qstring but I am not sure. It seems also that the header is removed while encoding. I would really appreciate your help.

0
7

The blob file is compressed with zlib, so you have to decompress it first. The first 4 bytes of the blob is the decompressed size and the compressed content start at 6th byte.

After the decompression you got binary file starting with 0xDEADBEAF (in big-endian, marked as yellow in the figure). After it you can find some header parameters, one of the 0x22 (marked as green) is the number of rows.

After the header you can find the row data as 32-bit float (see float conversion here):

6 = 06
0.756431 = 0x3f41a578
-1.494892 = 0xbfbf589f

Decompressed blob

2
  • I am really so much thankful for this.... I got everything except the part you said (one of the 0x22 (marked as green) is the number of rows.).....what do you mean by number of rows=22 – schrodinger May 27 '15 at 17:17
  • 0x22 = 34, and you had 34 rows in your xed file (see the first line of it) – ebux May 28 '15 at 4:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.