Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoding of owned resource IDs #2

Open
4 tasks
dgelessus opened this issue Sep 17, 2019 · 1 comment
Open
4 tasks

Decoding of owned resource IDs #2

dgelessus opened this issue Sep 17, 2019 · 1 comment

Comments

@dgelessus
Copy link
Owner

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
@dgelessus
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant