mirror of
https://github.com/whoeevee/ivinject.git
synced 2026-01-08 23:25:03 +00:00
14 lines
348 B
C#
14 lines
348 B
C#
namespace ivinject.Common;
|
|
|
|
internal static class FileStreamExtensions
|
|
{
|
|
internal static uint FileHeader(this FileStream stream)
|
|
{
|
|
using var reader = new BinaryReader(stream);
|
|
var bytes = reader.ReadBytes(4);
|
|
|
|
return bytes.Length != 4
|
|
? uint.MinValue
|
|
: BitConverter.ToUInt32(bytes);
|
|
}
|
|
} |