Skip to content
This repository was archived by the owner on Aug 10, 2025. It is now read-only.
This repository was archived by the owner on Aug 10, 2025. It is now read-only.

Optimize TagReader/TagWriter #21

Description

@ForeverZer0

The TagReader and TagWriter class still use the naive and legacy method of BitConverter.GetBytes paired with Array.Reverse to get the correct byte-order.

Replace all these method calls with the use of stackalloc spans and employ BinaryPrimitives methods to read/write in the appropriate endian. This will make them free of any heap-allocations in additional to being computationally less expensive.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions