[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libredwg] Comprlen
From: |
Dave Coventry |
Subject: |
[libredwg] Comprlen |
Date: |
Fri, 8 Jun 2012 23:08:01 +0200 |
I'm having a look at an AC1021 dwg file.
At Offset 0x80 I have the following data:
0x80 A2 B5 20 01 24 9A 03 11 ---CRC
0x88 1F 62 58 70 19 A0 7B 6F --- Unknown Key
0x90 10 EE 34 01 01 65 7F 00 --- Compressed data CRC
0x98 AA 6E 37 45 --- ComprLen
The 5.2 Specification says the following: "Note that if ComprLen is
negative, then Data is not compressed (and data length is ComprLen)."
I'm assuming that Reed-Solomon is not at work here.
Does the offset 0x98 indicate the size of the data?
The AA in the last byte indicates that the leftmost bit is set, which
means that it is negative.
Using two's complement:
10101010011011100011011101000101 inverted:
01010101100100011100100010111010+1=01010101100100011100100010111011
which is 1,435,617,467, so the data length is 1.4 Mb.
Which it can't be because the total file size is only 107,168 bytes.
Where am I going wrong?
- [libredwg] Comprlen,
Dave Coventry <=