You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This release is called v1.1.0 instead of v1.0.4 because it has a few breaking changes; hopefully these are the only breaking changes I will introduce for a really long time.
Additions
EndianBitConverter static class. Very similar to System.BitConverter provided with .NET. It has a property that represents the system's endianness and has methods to convert to/from data types with specified endianness. This means the library does not need to be used with a stream every time you just want a few conversions.
BinaryStringTrimNullTerminatorsAttribute - If you apply this attribute to string or char[] properties in an object, the resulting string/char[] will remove chars starting from the first '\0'. This attribute is optional and is not compatible with BinaryStringNullTerminatedAttribute.
Nice
Attributes optimized
You will now get an ArgumentOutOfRangeException when passing in invalid BooleanSize, Endianness, or EncodingType enum values
You will now get more descriptive errors with null arrays or invalid array count/index combinations
Fixes
Strings should no longer completely broken on Big Endian systems (cannot test)
Big Endian Unicode should work as intended on Big Endian systems (cannot test)
Decimal should now work on Big Endian systems (cannot test)
Breaking changes
All array methods in EndianBinaryWriter have had the index parameter renamed to startIndex. If you were manually referring to the parameter by its name, then you will need to change it.
char[] methods and string methods that needed a charCount now have a new parameter indicating whether the result should remove chars starting from the first '\0'. For example, EndianBinaryReader.ReadChars(int count) is now EndianBinaryReader.ReadChars(int count, bool trimNullTerminated)