refactoring - builds ok

This commit is contained in:
Stoyan Zlatev
2024-10-14 15:02:21 +02:00
parent 4c230b97cf
commit 4cc1be9326
114 changed files with 1730 additions and 1708 deletions
@@ -177,15 +177,25 @@
return bytes;
}
public static Byte[] GetBytesBE(this UInt32 value)
{
var bytes = new Byte[2];
bytes[0] = (Byte)(value >> 24);
bytes[1] = (Byte)(value >> 16);
bytes[2] = (Byte)(value >> 8);
bytes[3] = (Byte)value;
public static Byte[] GetBits(this Byte _byte)
return bytes;
}
public static Byte[] GetBits(this Byte @byte)
{
var bits = new Byte[8];
for (var i = 0; i < 8; i++)
{
bits[i] = (Byte)((_byte >> i) & 1);
bits[i] = (Byte)((@byte >> i) & 1);
}
return bits;