public static void WriteValueS64(this Stream stream, Int64 value, bool littleEndian) { if (ShouldSwap(littleEndian)) { value = value.Swap(); } byte[] data = BitConverter.GetBytes(value); Debug.Assert(data.Length == 8); stream.Write(data, 0, 8); }
public static void WriteValueS64(this Stream stream, Int64 value, Endian endian) { if (ShouldSwap(endian)) { value = value.Swap(); } var data = BitConverter.GetBytes(value); Debug.Assert(data.Length == 8); stream.WriteBytes(data); }