mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-05 22:01:33 +00:00
Both-Endian Numerics Support #10
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mnadareski on GitHub (Oct 23, 2025).
Originally assigned to: @mnadareski on GitHub.
To extend work that is currently being done, both-endian numerics should be implemented fully.
+,-,*,/,^)This should live in the IO repository under the
SabreTools.Numericsnamespace including extensions for reading and writing like any other numeric type.@Deterous commented on GitHub (Oct 27, 2025):
Desirable features:
obj.BothEndianInt32Value = data.ReadBytes(8);andobj.BothEndianInt16Value = data.ReadBytes(4);(that is, no need to donew BothEndianInt32();)type.Matchesortype.IsConsistenttype.LEandtype.BEtype = 1;andint num = type * 2;(defaulting to the LE value if they disagree? Or null or throw exception), as well astype.LE = 1andint num = type.LE * 2@mnadareski commented on GitHub (Oct 27, 2025):
A couple of notes to self on the above requests:
@mnadareski commented on GitHub (Oct 27, 2025):
This has been implemented in IO in the following commits:
8f06bf5859fb60f1fed5244b7411d4edd3e6eef27c63f44c75@mnadareski commented on GitHub (Oct 28, 2025):
IO 1.8.0 has been published and is in current rolling.