public static ulong PeekUInt64(this IBitBuffer buffer) { Span <byte> tmp = stackalloc byte[sizeof(ulong)]; buffer.Peek(tmp); return(BinaryPrimitives.ReadUInt64LittleEndian(tmp)); }
/// <summary> /// Reads an <see cref="int"/> without advancing the read position. /// </summary> public static int PeekInt32(this IBitBuffer buffer) { Span <byte> tmp = stackalloc byte[sizeof(int)]; buffer.Peek(tmp); return(BinaryPrimitives.ReadInt32LittleEndian(tmp)); }