-
Notifications
You must be signed in to change notification settings - Fork 201
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
macOS '.DS_Store' files #131
Conversation
Thanks for this PR! I haven't yet done a through review, but I've noticed that you use
Um, sorry, I don't quite follow what you mean here. You want some offsets to be automatically adjusted by size of
Try splitting it into separate type, i.e.: instances:
directories:
io: _root._io
type: master_block_ref(_index)
repeat: expr
repeat-expr: directory_count
doc: Master blocks of the different B-trees
types:
master_block_ref:
params:
- id: idx
type: u8
instances:
master_block:
pos: (block_addresses[directory_entries[idx].block_id] >> 0x05 << 0x05) + 4
size: 1 << block_addresses[directory_entries[idx].block_id] & 0x1f
type: master_block |
Of course, thanks for catching that. Actually, I read the style guide and renamed some of the fields accordingly. For example, I searched for occurrences of
Actually,
I will try and let you know. Thanks. |
There will be, once we'll get sizeof-style things done. |
It works well now 👍 |
Ready for to be merged? |
If you're satisfied of my work, yes |
Moving the block address mask to root level "should reduce the amount of memory occupied by each 'block_descriptor' object." @KOLANICH See kaitai-io#131 (comment).
Thank you for your contribution ;) |
Just merged in, thanks for this awesome work! |
Hello,
This PR aims to add a description for the macOS
.DS_Store
files generated by the Finder. You can test the description on these files: ds_store_samples.zipThere are two things I would like to improve though:
alignment_header
but I didn't succeed to make it work. I had to manually add 4 to the result as in this example:buddy_allocator_header.ofs_bookkeeping_info_block + 4
_index
lines 65 and 66, I get the following error:undefined TypeError: this.directoryEntries[i] is undefined
. I think it is the same issue as described in Referencing _index in the pos attribute of a repeated instance produces: undefined local variable or method `i' kaitai_struct#436.Could you please give me a hand on these two issues?
Thank you in advance.