UMemory is lightweight library written in unsafe context for memory I/O operations that supports endianness type without performance loss. It should outperform, but not replace .NET BinaryReader/BinaryWriter on MemoryStream. Best use of this library would be for memory I/O operations where array boundaries and operations are known since there is no real length of stream, only position and capacity. For example TCP/IP packets where new arrays are constantly created. UMemory allocates unmanaged memory so GC will not trigger as much, but that memory must be freed manualy.
- Faster memory I/O operations
- Endianness type support
- Less GC triggers
- Interface for custom type Read/Write
- Unsafe context
- Less security checks
- Manual memory allocation/free
Extend UMemoryStream type and create new instance of it.
Product is licensed by The MIT License (MIT). See LICENSE for more details.