python-rsrcfork
python-rsrcfork copied to clipboard
Decoding of owned resource IDs
Resources with IDs in range(-16384, 0)
are considered "owned" by (i. e. associated with) another resource, and the type and ID of the owning resource are encoded in the owned resource's ID. It would be useful to support:
- [ ] Decoding and encoding owned resource IDs
- [ ] Accessing the owning resource of an owned resource
- [ ] Finding all resourced owned by a particular resource
- [ ] Displaying ownership information in the command line tool
After looking into this some more, it seems that this ownership encoding doesn't apply universally. Some resource IDs fall into the "owned" range, but don't actually belong to the resource that their ID indicates (often the supposed owning resource doesn't even exist in the resource file). One case of this ('SIZE' (-1)
resources) is even documented in Inside Macintosh.
With this in mind, it would still make sense to provide utility functions to manually encode/decode owned resource IDs, but the rsrcfork
library shouldn't assume that resource IDs in the "owned" range can always be meaningfully decoded.