Later RIFF CorelDRAW files keep most of the drawing in a list of type
cmpr. Its chunks are compressed together as one
zlib stream, and their lengths are moved
out into a second one. This page follows libcdr’s reader; the version that started
using it is not given there.
Layout
Offsets count from the start of the LIST chunk. Numbers are
little-endian.
0LIST and its length8 bytes8List typecmpr4 bytes12Compressed size the size of the first zlib stream4 bytes16Unknown three 32-bit numbers libcdr steps over12 bytes28SignatureCPng4 bytes32Two numbers 16-bit 1 and 16-bit 4; libcdr checks both4 bytes36Chunks a zlib stream of the compressed sizevaries…Block lengths a zlib stream, to the end of the listvaries
Block lengths
The second stream inflates to a table of unsigned 32-bit numbers. Inside the first stream every chunk has the usual eight-byte header, but its length field is an index into this table: a chunk whose length field is n is as long as entry n. libcdr uses the field as it is when it is not a valid index. The length fields of lists inside the compressed list are indexes too.
So the inflated chunks cannot be read on their own: a reader needs both streams. The explorer shows the compressed list’s header and both zlib streams, block by block, and opens the chunks with their table of lengths as a file of their own.