Author Topic: updated cdr.trid.xml for CorelDraw Document (*.cdr)  (Read 2229 times)

jenderek

  • Sr. Member
  • ****
  • Posts: 375
updated cdr.trid.xml for CorelDraw Document (*.cdr)
« on: September 25, 2019, 11:10:50 PM »
Hello trid users,

some days ago i run TrID on my CorelDraw Document test collection with file
name extension cdr. One is only identified by riff.trid.xml as "Generic RIFF
container" ( see appended output/trid-old.txt).

Some information about such CorelDraw documents is found on fileformats
archiveteam website. This is now expressed by new line

   <RefURL>http://fileformats.archiveteam.org/wiki/CorelDRAW</RefURL>

According to Resource Interchange File Format on Wikipedia at offset 4 a
long integer is stored, which contains the chunk size. When adding 8 to this
value the result represent the file size. For test purpose i create a big
CorelDraw sample 8-8192Nothumb.cdr with file size 31872070. That is 01E65446
in hexadecimal. For that sample the highest byte of chunk size is not
null. So XML construct

   <Bytes>004344</Bytes>
   <ASCII> . C D</ASCII>
   <Pos>7</Pos>

must be changed to

   <Bytes>4344</Bytes>
   <ASCII> C D</ASCII>
   <Pos>8</Pos>

Characteristic is the second 4 byte riff chunk often starting with CDR for
version 3. With every next full version last letter of second riff chunk is
incremented by 1 unit. So version 4 is described by CDR4 and so on. This is
described by above construct.

From version 3 CorelDraw used riff based file format. And til version 15 the
version number is also stored in third following 2 byte sized tag vrsn. This
is expressed by XML construct:
   
   <Bytes>7672736E02000000</Bytes>
   <ASCII> v r s n</ASCII>
   <Pos>12</Pos>

So mention this fact by remark line:

   <Rem>for most versions from 3 til 15</Rem>

Since version 16 version is stored in third tag with name fver and 16 byte
size. But this not a problem. The riff component does not occur as single
file any more. Instead it is embedded inside zip container. This variant is
already described as zipped CorelDRAW drawing by cdr-zip.trid.xml.

With the updated definition file big undetected CorelDraw samples are now
recognized ( see appended output/trid-new-v.txt). TrID definitions, and
output are stored in archive v8.zip. I hope that my XML file can be used in
future version of triddefs.


But according to reference there is still a problem with intermediate versions
like 8.0 Bidi and 12.5, because there second riff tag is cdr8 or DESC. So
these tags does not start with up cased string CDR. So these version are not
detected by cdr.trid.xml. But i will handle these things in future sessions.

With best wishes
Jörg Jenderek

Mark0

  • Administrator
  • Hero Member
  • *****
  • Posts: 2743
    • Mark0's Home Page
Re: updated cdr.trid.xml for CorelDraw Document (*.cdr)
« Reply #1 on: September 26, 2019, 01:28:27 AM »
Thanks for the refined def!