File compression detection

I need to read some data stored by a third-party application in the Acess 2000 database. The seller no longer asks questions.

One table contains image data that seems to be compressed, since the source application can export the contents of the blob field to an embedded png image in the xls export file.

I extracted the contents of the record using ADO and Delphi (TADOBlobStream), saved it to disk, and opened it using a hex editor.

The first 100 characters in hexadecimal format are as follows

F8 1B 00 00 07 C0 24 27 01 40 7F 20 EC 5D 24 2D 88 5C F0 A7 49 91 4A C4 EA 85 D2 98 6A B5 79 D7 B7 2B D5 48 F8 1B 00 00 07 C0 24 27 01 40 7F 20 EC 5D 24 2D 88 5C F0 A7 49 91 4A C4 EA 85 D2 98 6A B5 79 D7 B7 2B D5 48 1A 9A C8 D3 54 E3 A3 E4 F5 29 C6 97 22 95 6A 8E 10 BD 3E 4B 0B 11 AA 6D A8 C6 87 92

Can someone tell me if this matches the commonly used compression algorithm. It seems that the third-party application uses the zlib encoding method due to the presence of DLL encoding in the bin directory. But using zlib to unpack does not give PNG. FYI, the saved file is about 20% of the size of the PNG file embedded in XLS.

thanks

+3
source share
5 answers

.

  • , /, .
  • PNG.
  • .

blob PNG. , blob .

- , ( -) .

+5
0

, zlib , PNG. , ? , JPEG GIF - , ?

0

, , Pkware (-, , ) , . , , .

( ) , - .

SDK : http://www.pkware.com/software-developer-tools-margin/software-developer-kits

dos-, Windows , .

0

I was curious, so I decided to look. I needed to get it in binary form, so to save the next guy in some kind of work, I did it in python. Hope this helps:

#!/usr/bin/python
from zlib import decompress; 

f = open('/tmp/data', 'w+'); 
s = "";
for b in [int(x, 16) for x in ("F8 1B 00 00 07 C0 24 27 01 40 7F 20 " +
 "EC 5D 24 2D 88 5C F0 A7 49 91 4A C4 EA 85 D2 98 6A B5 79 D7 B7 2B " +
 "D5 48 F8 1B 00 00 07 C0 24 27 01 40 7F 20 EC 5D 24 2D 88 5C F0 A7 " +
 "49 91 4A C4 EA 85 D2 98 6A B5 79 D7 B7 2B D5 48 1A 9A C8 D3 54 E3 " +
 "A3 E4 F5 29 C6 97 22 95 6A 8E 10 BD 3E 4B 0B 11 AA 6D A8 C6 87 92".split(" ")]:
  s += chr(b);

s = decompress(s);
f.write(s);
f.close();
0
source

Source: https://habr.com/ru/post/1717697/


All Articles