draft of the C version of the resource getter functions
Migrate the raw data module to pure C