public static Guid ReadValueGuid(this Stream stream, Endian endian) { var a = stream.ReadValueS32(endian); var b = stream.ReadValueS16(endian); var c = stream.ReadValueS16(endian); var d = SmallWorkBuffer.ReadBytes(stream, 8); return(new Guid(a, b, c, d)); }
public static uint ReadValueU32(this Stream stream, Endian endian) { var data = SmallWorkBuffer.ReadBytes(stream, 4); var value = BitConverter.ToUInt32(data, 0); if (ShouldSwap(endian) == true) { value = value.Swap(); } return(value); }
public static byte ReadValueU8(this Stream stream) { return(SmallWorkBuffer.ReadBytes(stream, 1)[0]); }