for first short summary. There are at least three types of file
RSS - text file contains resources
RSC - file with compiled resources
RSG - file with defines, so compiled resources can be reached from your code
Resource files could also use other compiled resource files by including .rsg files as headers or .mbg files for image identify and .hrh files with some defines and .loc files to make further localization easier. As you see in EPOC there are many various file types (about twenty?)
Resource compilation has been made by using rcomp utility, like this:
rcomp -otest.rsc -htest.rsg -stest.rss
Structure of binary .rsc file is very primitive, it is just a header, index table with offsets of compiled resources and complied resources of course
.rsg file are only #define macros which binds resource name from .rss file written by capitals with its offset in index table in .rsc file, so there could be something like this:
#define PERSON 0x6120e001
where the lowes 12 bits are used to specify index of resource (so there is max 4095 resources) and last 24 bits are taken from NAME directive, which allows to your application to use more resource files.