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

Add support for writing data-less sectors in IMD. #336

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tdaede
Copy link
Contributor

@tdaede tdaede commented Jul 13, 2023

This adds sector record 0 type support to the IMD writer.

It currently adds IDAM areas into the sector list. Most writers
seem to be able to skip these appropriately, however I'm not
sure mixing data types in the sector list is the best approach.
Other approaches included a None or special DAM, or a dedicated
list of IDAMs like the IAM list.

The reader can read these back but currently does not encode a
flux stream without a DAM.

(it does seem this feature is relatively poorly supported in
IMD readers as well)

@keirf
Copy link
Owner

keirf commented Jul 14, 2023

Yes this is a tough one and I'm sure mixing types in the list will break some list users. Mypy ought to be able to detect that but I probably nobbled it with the not-very-nice assignment to iam vs sectors in decode_raw via a generic List[Any]. I need to think about a simpler representation of sectors in their variety of damaged forms. Good call though on handling "missing data", so I will get this merged in somehow.

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

Successfully merging this pull request may close these issues.

2 participants