Skip to content

v2.0.0 - .NET 6.0

Compare
Choose a tag to compare
@Kermalis Kermalis released this 30 Aug 20:07
· 19 commits to master since this release
f7581f8

Version 2.0.0 Changelog:

  • Rewritten with Span<T> and performance in mind. No allocations unless absolutely necessary
  • The compiler will now inline certain methods. For example, ReadEnum<TEnum>() will only include code that will be executed for the given enum size. So passing a TEnum that is the size of a byte will condense down to just a ReadByte() call with no size/type checks
  • Implemented reading and writing for Half, DateOnly, TimeOnly, Vector2, Vector3, Vector4, Quaternion, and Matrix4x4
  • Removed bloated overloads (with array offset/count, alternate Encoding/BooleanSize, null termination, etc.). The reader/writer now respects its state (such as whether to use ASCII, and which BooleanSize to use) which you can change at any time
  • decimal int order now matches with .net APIs
  • Removed EndianBitConverter in favor of EndianBinaryPrimitives, which has similar API while using modern programming like Span<T>
  • API uses nullable notations
  • You can now ReadObject() and WriteObject() with primitives and other supported types like DateTime, Vector3, etc.
  • Removed Encoding usage. The whole thing was very complicated before, and it barely functioned. Now you have ASCII and .net (UTF16-LE) support by default, and can add your own requirements either by extension methods or inheriting the reader/writer