public void Deserialize(ref ReadOnlySpan <byte> buffer) { SessionId ??= new SessionId(); SessionId.Deserialize(ref buffer); FieldId = BinSerialize.ReadPackedUnsignedInteger(ref buffer); StartIndex = BinSerialize.ReadPackedUnsignedInteger(ref buffer); Take = BinSerialize.ReadPackedUnsignedInteger(ref buffer); }
public void Deserialize(ref ReadOnlySpan <byte> buffer) { SessionId ??= new SessionId(); SessionId.Deserialize(ref buffer); Counter = BinSerialize.ReadPackedUnsignedInteger(ref buffer); Flags = (Pv2StreamFlags)BinSerialize.ReadByte(ref buffer); var count = BinSerialize.ReadByte(ref buffer); Groups = new List <ushort>(count); for (var i = 0; i < count; i++) { Groups.Add(BinSerialize.ReadUShort(ref buffer)); } }