Exemple #1
0
 public override byte[] Save(Endianness endianness)
 {
     byte[] result = new byte [8 + data.Length];
     result[0] = (byte)Name[0];
     result[1] = (byte)Name[1];
     result[2] = (byte)Name[2];
     result[3] = (byte)Name[3];
     AutoBitConv.ToInt32(endianness, result, 4, data.Length);
     data.CopyTo(result, 8);
     return(result);
 }
Exemple #2
0
 public override byte[] Save(Endianness endianness)
 {
     byte[] data   = SaveBody(endianness);
     byte[] result = new byte [12 + data.Length];
     result[0] = (byte)'R';
     result[1] = (byte)'I';
     result[2] = (byte)'F';
     result[3] = (byte)'F';
     AutoBitConv.ToInt32(endianness, result, 4, data.Length + 4);
     result[8]  = (byte)Name[0];
     result[9]  = (byte)Name[1];
     result[10] = (byte)Name[2];
     result[11] = (byte)Name[3];
     data.CopyTo(result, 12);
     return(result);
 }