BinarySerializer icon indicating copy to clipboard operation
BinarySerializer copied to clipboard

Insert data interpretation layer

Open jefffhaynes opened this issue 6 years ago • 7 comments

At some point in the distant future, remove weird work-around for deferred evaluation of endianness and add an interpretation layer that decouples reading and writing from value representation

jefffhaynes avatar Nov 18 '17 21:11 jefffhaynes

Would this work as a post-deserialization step where you can process your data (using functions and the like)?

Waelwindows avatar Apr 06 '18 08:04 Waelwindows

No, the idea is simply to decouple the interpretation of the data (e.g converting four bytes into an int) from the reading of the data. This is especially relevant when endianness comes into play and there are some hacky things happening in the current design because the decoupling isn’t that clean right now.

— If you want to build a ship, don't drum up people to collect wood and don't assign them tasks and work, but rather teach them to long for the endless immensity of the sea.

Antoine de Saint-Exupery


From: Waelwindows [email protected] Sent: Friday, April 6, 2018 4:23:10 AM To: jefffhaynes/BinarySerializer Cc: Jeff Haynes; Assign Subject: Re: [jefffhaynes/BinarySerializer] Insert data interpretation layer (#77)

Would this work as a post-(de)serialization step where you can process your data?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/jefffhaynes/BinarySerializer/issues/77#issuecomment-379183859, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJSKRwkmRWegqWN1-NUGOOFVLGVWOwnyks5tlyXugaJpZM4QjJl_.

jefffhaynes avatar Apr 06 '18 09:04 jefffhaynes

Ah, so will this help with the FieldScale bug you have with a different endianness?

Waelwindows avatar Apr 06 '18 09:04 Waelwindows

Maybe. What bug is that? 🙂

jefffhaynes avatar Apr 06 '18 09:04 jefffhaynes

If you have a field with the FieldScale attribute in Little Endian it deserializes correctly, however, if you try the same but in BigEndian, you get garbled data.

Waelwindows avatar Apr 06 '18 09:04 Waelwindows

Then yes, that’s probably related. Would you mind entering that as a separate bug if it isn’t already?

jefffhaynes avatar Apr 06 '18 09:04 jefffhaynes

Thanks!


From: Waelwindows [email protected] Sent: Friday, April 6, 2018 5:14:55 AM To: jefffhaynes/BinarySerializer Cc: Jeff Haynes; Assign Subject: Re: [jefffhaynes/BinarySerializer] Insert data interpretation layer (#77)

If you have a field with the FieldScale attribute in Little Endian it deserializes correctly, however, if you try the same but in BigEndian, you get garbled data.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/jefffhaynes/BinarySerializer/issues/77#issuecomment-379196419, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJSKR_SL6jwuz-aic6R1Aom367NB_X9jks5tlzIPgaJpZM4QjJl_.

jefffhaynes avatar Apr 06 '18 09:04 jefffhaynes