public void Read(byte[] headerData) { var pos = PacketHeaderMsgPackStartPos; TotalSize = FastBinaryRead.UInt16(headerData, pos); pos += 2; Id = FastBinaryRead.UInt16(headerData, pos); pos += 2; Type = headerData[pos]; pos += 1; }
public static char Char(ReadOnlySpan <byte> bytes, int offset) { return((char)FastBinaryRead.UInt16(bytes, offset)); }
public static UInt16 GetTotalSize(byte[] data, int startPos) { return(FastBinaryRead.UInt16(data, startPos + PacketHeaderMsgPackStartPos)); }
public static char Char(byte[] bytes, int offset) { return((char)FastBinaryRead.UInt16(bytes, offset)); }