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

What is the right way to parse chunk based file formats? #1689

Open
auronen opened this issue Aug 21, 2023 · 0 comments
Open

What is the right way to parse chunk based file formats? #1689

auronen opened this issue Aug 21, 2023 · 0 comments

Comments

@auronen
Copy link

auronen commented Aug 21, 2023

Hello,
what is the idiomatic way to parse chunk based binary formats (example)?
Is there a nice built-in way to pass in an extra self parameter, to accumulate the chunk contents into a struct instance?

For a chunk based file format that has only one level of chunk structure one could potentially parse the chunks as enum separately and then move the data to the instance of the struct. But the linked format has nested chunks and I have no idea how to approach this.

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