public static long ReadBufferInt64(byte[] buffer, int bufferOffset) { var longBuffer = new byte[8]; Buffer.BlockCopy(buffer, bufferOffset, longBuffer, 0, 8); return(LittleEndianByteOrder.GetInt64(longBuffer)); }
public static double ReadBufferDouble(byte[] buffer, int bufferOffset) { var doubleBuffer = new byte[8]; Buffer.BlockCopy(buffer, bufferOffset, doubleBuffer, 0, 8); return(LittleEndianByteOrder.GetDouble(doubleBuffer)); }
public static int ReadBufferInt32(byte[] buffer, int bufferOffset) { var intBuffer = new byte[4]; Buffer.BlockCopy(buffer, bufferOffset, intBuffer, 0, 4); return(LittleEndianByteOrder.GetInt32(intBuffer)); }
public static void WriteBuffer(int value, byte[] buffer, int bufferOffset) { Buffer.BlockCopy(LittleEndianByteOrder.GetBytes((int)value), 0, buffer, bufferOffset, 4); }