This commit is contained in:
bird_egop
2026-06-06 00:42:07 +03:00
parent 49d9e23738
commit 0d8e4ba491
9 changed files with 266 additions and 35 deletions
+8
View File
@@ -29,6 +29,14 @@ public static class Extensions
return BinaryPrimitives.ReadUInt16LittleEndian(buf);
}
public static short ReadInt16LittleEndian(this Stream fs)
{
Span<byte> buf = stackalloc byte[2];
fs.ReadExactly(buf);
return BinaryPrimitives.ReadInt16LittleEndian(buf);
}
public static float ReadFloatLittleEndian(this Stream fs)
{
Span<byte> buf = stackalloc byte[4];