public void Read(Stream stream) { BinaryReader br = new BinaryReader(stream); rscAlignShift = br.ReadUInt16(); List <TYPEINFO> lTypeInfo = new List <TYPEINFO>(); for (TYPEINFO typeInfo = new TYPEINFO(stream); typeInfo.rtTypeID != 0; typeInfo = new TYPEINFO(stream)) { lTypeInfo.Add(typeInfo); } rscTypes = lTypeInfo.ToArray(); rscEndTypes = 0; rscResourceNames = new byte[0]; for (byte nameLen = br.ReadByte(); nameLen != 0; nameLen = br.ReadByte()) { byte[] newArray = new byte[rscResourceNames.Length + nameLen + 1]; rscResourceNames.CopyTo(newArray, 0); newArray[rscResourceNames.Length] = nameLen; stream.Read(newArray, rscResourceNames.Length + 1, nameLen); rscResourceNames = newArray; } rscEndNames = 0; }
public TYPEINFO(Stream stream) { this = new TYPEINFO(); Read(stream); }
public TYPEINFO(Stream stream) { this = new TYPEINFO(); this.Read(stream); }
public void Read(Stream stream) { BinaryReader br = new BinaryReader(stream); rscAlignShift = br.ReadUInt16(); List<TYPEINFO> lTypeInfo = new List<TYPEINFO>(); for(TYPEINFO typeInfo = new TYPEINFO(stream); typeInfo.rtTypeID != 0; typeInfo = new TYPEINFO(stream)) lTypeInfo.Add(typeInfo); rscTypes = lTypeInfo.ToArray(); rscEndTypes = 0; rscResourceNames = new byte[0]; for(byte nameLen = br.ReadByte(); nameLen != 0; nameLen = br.ReadByte()) { byte[] newArray = new byte[rscResourceNames.Length + nameLen + 1]; rscResourceNames.CopyTo(newArray, 0); newArray[rscResourceNames.Length] = nameLen; stream.Read(newArray, rscResourceNames.Length + 1, nameLen); rscResourceNames = newArray; } rscEndNames = 0; }