mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2026-08-15 02:57:49 +04:00
push
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user