You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[NRBF] change StartsWithPayloadHeader to accept a Span rather than array (#103636)
* change StartsWithPayloadHeader to accept a Span rather than array
* address code review feedback: don't use MemoryMarshal.Cast<byte, int> because it's not guaranteed to work everywhere
/// Checks if given buffer starts with <see href="https://learn.microsoft.com/openspecs/windows_protocols/ms-nrbf/a7e578d3-400a-4249-9424-7529d10d1b3c">NRBF payload header</see>.
23
33
/// </summary>
24
34
/// <param name="bytes">The buffer to inspect.</param>
25
35
/// <returns><see langword="true" /> if it starts with NRBF payload header; otherwise, <see langword="false" />.</returns>
/// Checks if given stream starts with <see href="https://learn.microsoft.com/openspecs/windows_protocols/ms-nrbf/a7e578d3-400a-4249-9424-7529d10d1b3c">NRBF payload header</see>.
@@ -76,13 +68,13 @@ public static bool StartsWithPayloadHeader(Stream stream)
0 commit comments