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

writer: Revisit length of arrays when encoding #37

Open
usedbytes opened this issue May 9, 2019 · 0 comments
Open

writer: Revisit length of arrays when encoding #37

usedbytes opened this issue May 9, 2019 · 0 comments
Milestone

Comments

@usedbytes
Copy link
Contributor

It's not obvious how the length of Arrays should be handled when encoding. In the profile xls, some arrays are tagged with "[N]", presumably indicating that they have a variable length. In some of these cases, the "EXAMPLE" column includes a number which appears to be the intended length. In other cases, the "EXAMPLE" column only has '1'.

The decoder always reads the number of elements which are encoded in the file. The encoder could also do this - but the length would need to be known at the point of generating the definition message, which means if the length is different between messages in the same file, we'd need to make a new definition message (see also, #36) or truncate/pad.

The current behaviour is to use the value from the "EXAMPLE" column, and always encode exactly that number of elements, truncating or padding as necessary. This causes the DecodeEncodeDecode test to fail in a number of cases, because this length is '1' in the xls, whereas the input file has many elements.

@tormoder tormoder added this to the Unplanned milestone May 10, 2019
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

2 participants