typedef union {
uint32 ctype <format=hex>; // Chunk Type
char cname[4]; // character representation
} CTYPE ;
typedef struct {
uint32 length; // Number of data bytes (not including length,type, or crc)
CTYPE type; // Type of chunk
ubyte data[length]; // Data (or not present)
uint32 crc <format=hex>; // CRC type and data (not including length or crc)
} CHUNK ;
<Block name = "Chunk" minOccurs = "1" maxOccurs = "1024">
<Number name = "Length" size = "32" endian="big" signed = "false">
<Relation type = "size" of = "Data" />
</Number>
<Block name = "TypeAndData">
<Blob name = "Type" length = "4" mutable="false"/>
<Blob name = "cname" length="4"/>
</Block>
<Blob name = "Data" />
<Number name = "CRC" size = "32">
<Fixup class = "checksums.Crc32Fixup">
<Param name = "ref" value = "TypeAndData" />
</Fixup>
</Number>
</Block>