Main Page | Report this Page

 




 

 

Science Forum Index  »  Compression Forum  »  What is this compression format ?
Page 1 of 1    

What is this compression format ?

Author Message
TestMan
Posted: Mon Sep 18, 2006 1:58 pm
Guest
Hi all,

I've found in a file the sequence 78 9c ec bd that is starting a
compressed stream.

Any idea what could be the compression behing this magic number ?
FYI this is on illustrator 12 file format (AI).

The first char is a 'x' (7Cool and is maybe not part of the magic number,
but the rest of it is definitly such a number.

Rgs,
TM
 
Carsten Neubauer
Posted: Mon Sep 18, 2006 3:20 pm
Guest
TestMan schrieb:

[quote:230af6bb2a]...
I've found in a file the sequence 78 9c ec bd that is starting a
compressed stream.
...
[/quote:230af6bb2a]
Seems you ran into a ZLIB-stream.
See

ZLIB Compressed Data Format Specification version 3.3
http://www.faqs.org/rfcs/rfc1950.html

or have a look at

http://www.zlib.net/

Regards,

Carsten Neubauer
http://www.c14sw.de/
 
TestMan
Posted: Tue Sep 19, 2006 4:30 pm
Guest
Carsten Neubauer a écrit :
[quote:3f83c2a808]TestMan schrieb:

...
I've found in a file the sequence 78 9c ec bd that is starting a
compressed stream.
...

Seems you ran into a ZLIB-stream.
See

ZLIB Compressed Data Format Specification version 3.3
http://www.faqs.org/rfcs/rfc1950.html
[/quote:3f83c2a808]
Viele danke Carsten,

Can you clarify how you came to that conclusion ?

I've seen no magic number in the ZLIB spec :(

Rgs,
TM
 
Carsten Neubauer
Posted: Tue Sep 19, 2006 8:18 pm
Guest
TestMan schrieb:

[quote:9e65c8c38c]Carsten Neubauer a écrit :
TestMan schrieb:

...
I've found in a file the sequence 78 9c ec bd that is starting a
compressed stream.
...

Seems you ran into a ZLIB-stream.
See

ZLIB Compressed Data Format Specification version 3.3
http://www.faqs.org/rfcs/rfc1950.html

Viele danke Carsten,

Can you clarify how you came to that conclusion ?

I've seen no magic number in the ZLIB spec :(

Rgs,
TM
[/quote:9e65c8c38c]
There is no magic number, but 0x789C looks like a ZLIB header to me.

See section 2.2 in rfc1950.
CMF: 0x78
bits 0 to 3: compression method 8 = deflate
bits 4 to 7: window size 32kB
FLG: 0x9C
bits 0 to 4: check bits, 0x789C = 30876, which is a multiple of 31
bit 5: no preset dictionary
bits 6 to 7: compression level 2, irrelevant for decompression
0xEC and 0xBD: start of data, see rfc 1951 or use ZLIB to decode.

A 32kB window and no dictionary are standard values for ZLIB.
Compression method 8 is the only one allowed.
The check bits make it a value, dividable by 31.
So everything looks fine.

You will find those streams in a lot of files, like PDFs etc.

Regards and bon nuit,

Carsten Neubauer
http://www.c14sw.de/
 
Mark Adler
Posted: Tue Sep 19, 2006 10:38 pm
Guest
TestMan wrote:
[quote:60b6d815a0]Can you clarify how you came to that conclusion ?

I've seen no magic number in the ZLIB spec Sad
[/quote:60b6d815a0]
He's right. It's almost certainly a zlib stream. There is a set of
magic numbers that a zlib stream starts with, and 78 9c is among them.
Also the next two bytes are the beginning of a valid deflate stream.

mark
 
TestMan
Posted: Wed Sep 20, 2006 5:57 am
Guest
Carsten Neubauer a écrit :
[quote:db9abcbf99]TestMan schrieb:

Carsten Neubauer a écrit :
TestMan schrieb:

...
I've found in a file the sequence 78 9c ec bd that is starting a
compressed stream.
...
Seems you ran into a ZLIB-stream.
See

ZLIB Compressed Data Format Specification version 3.3
http://www.faqs.org/rfcs/rfc1950.html
Viele danke Carsten,

Can you clarify how you came to that conclusion ?

I've seen no magic number in the ZLIB spec :(

Rgs,
TM

There is no magic number, but 0x789C looks like a ZLIB header to me.

See section 2.2 in rfc1950.
CMF: 0x78
bits 0 to 3: compression method 8 = deflate
bits 4 to 7: window size 32kB
FLG: 0x9C
bits 0 to 4: check bits, 0x789C = 30876, which is a multiple of 31
bit 5: no preset dictionary
bits 6 to 7: compression level 2, irrelevant for decompression
0xEC and 0xBD: start of data, see rfc 1951 or use ZLIB to decode.

A 32kB window and no dictionary are standard values for ZLIB.
Compression method 8 is the only one allowed.
The check bits make it a value, dividable by 31.
So everything looks fine.

You will find those streams in a lot of files, like PDFs etc.

Regards and bon nuit,

Carsten Neubauer
http://www.c14sw.de/

[/quote:db9abcbf99]
Crystal clear answer ! Great thanks again.

Tschüß,
TM
 
TestMan
Posted: Wed Sep 20, 2006 6:00 am
Guest
Mark Adler a écrit :
[quote:9ee0d7ad36]TestMan wrote:
Can you clarify how you came to that conclusion ?

I've seen no magic number in the ZLIB spec :(

He's right. It's almost certainly a zlib stream. There is a set of
magic numbers that a zlib stream starts with, and 78 9c is among them.
Also the next two bytes are the beginning of a valid deflate stream.

mark
[/quote:9ee0d7ad36]
Thanks mark for the answer !

FYI this stream is part of AdobeIlustrator CS2 (AI 12) new file format
.... trying to recover a crashed AI file :(

Rgs,
TM
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Thu Sep 02, 2010 4:59 pm