public static Guid ReadGuid(byte[] buffer, ref int offset)
 {
     offset += 16;
     return(LittleEndianConverter.ToGuid(buffer, offset - 16));
 }
 public static uint ReadUInt32(byte[] buffer, ref int offset)
 {
     offset += 4;
     return(LittleEndianConverter.ToUInt32(buffer, offset - 4));
 }
 public static ulong ReadUInt64(byte[] buffer, ref int offset)
 {
     offset += 8;
     return(LittleEndianConverter.ToUInt64(buffer, offset - 8));
 }
Beispiel #4
0
 public static Guid ReadGuidBytes(Stream stream)
 {
     byte[] buffer = new byte[16];
     stream.Read(buffer, 0, 16);
     return(LittleEndianConverter.ToGuid(buffer, 0));
 }
 public static ushort ReadUInt16(byte[] buffer, ref int offset)
 {
     offset += 2;
     return(LittleEndianConverter.ToUInt16(buffer, offset - 2));
 }
Beispiel #6
0
 public static ulong ReadUInt64(Stream stream)
 {
     byte[] buffer = new byte[8];
     stream.Read(buffer, 0, 8);
     return(LittleEndianConverter.ToUInt64(buffer, 0));
 }
Beispiel #7
0
 public static uint ReadUInt32(Stream stream)
 {
     byte[] buffer = new byte[4];
     stream.Read(buffer, 0, 4);
     return(LittleEndianConverter.ToUInt32(buffer, 0));
 }
Beispiel #8
0
 public static ushort ReadUInt16(Stream stream)
 {
     byte[] buffer = new byte[2];
     stream.Read(buffer, 0, 2);
     return(LittleEndianConverter.ToUInt16(buffer, 0));
 }
 public static void WriteInt32(Stream stream, int value)
 {
     byte[] bytes = LittleEndianConverter.GetBytes(value);
     stream.Write(bytes, 0, bytes.Length);
 }
 public static void WriteGuidBytes(byte[] buffer, int offset, Guid value)
 {
     byte[] bytes = LittleEndianConverter.GetBytes(value);
     Array.Copy(bytes, 0, buffer, offset, bytes.Length);
 }