Dennis Nedry
Well-known member
I'm working on figuring out how resource forks are parsed, somewhat for curiosity and also maybe for some use to somebody. I've made some progress, could anybody fill in some more info? I can't seem to find this online anywhere.
HEADER
0000 : 0003 Resource Raw Data Stating Location (= length of header)
0004 : 0007 Footer Starting Location
0008 : 000B Resource Raw Data Length
000C : 000F Resource Footer Length
RESOURCE DATA
Loop
4 bytes Length of resource data (x)
x bytes Resource data
End Loop
RESOURCE FOOTER
0x10 bytes Repeat of header data 0000:000F
0x0C bytes unknown
0x02 bytes 0-based count of resource types
loop
0x04 bytes 32-bit ASCII resource type
0x02 bytes 0-based quantity of this resource type (?)
0x02 bytes unknown (?)
end loop
loop
0x02 bytes resource ID number (16-bit)
0x02 bytes attributes (?)
0x04 bytes Offset to this specific resource data from raw data starting location
0x04 bytes attributes (?)
end loop
loop
0x01 byte resource name length (x)
x bytes ASCII resource name
end loop
HEADER
0000 : 0003 Resource Raw Data Stating Location (= length of header)
0004 : 0007 Footer Starting Location
0008 : 000B Resource Raw Data Length
000C : 000F Resource Footer Length
RESOURCE DATA
Loop
4 bytes Length of resource data (x)
x bytes Resource data
End Loop
RESOURCE FOOTER
0x10 bytes Repeat of header data 0000:000F
0x0C bytes unknown
0x02 bytes 0-based count of resource types
loop
0x04 bytes 32-bit ASCII resource type
0x02 bytes 0-based quantity of this resource type (?)
0x02 bytes unknown (?)
end loop
loop
0x02 bytes resource ID number (16-bit)
0x02 bytes attributes (?)
0x04 bytes Offset to this specific resource data from raw data starting location
0x04 bytes attributes (?)
end loop
loop
0x01 byte resource name length (x)
x bytes ASCII resource name
end loop