示例#1
0
        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));
        }
示例#2
0
        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);
        }
示例#3
0
 public static byte ReadValueU8(this Stream stream)
 {
     return(SmallWorkBuffer.ReadBytes(stream, 1)[0]);
 }