return readVersionInfo(new DataReader(data));
}
public static VersionInfo readVersionInfo(IDataReader dr)
throws IOException {
VersionInfo vi = new VersionInfo();
vi.setLength(dr.readWord());
vi.setValueLength(dr.readWord());
vi.setType(dr.readWord());
vi.setKey(dr.readUnicode());
if (vi.getKey().length() % 2 == 1)
dr.readWord(); // padding
vi.setFixedFileInfo(ResourceParser.readFixedFileInfo(dr));
int length = dr.readWord(); // length
dr.readWord(); // value length
dr.readWord(); // type
vi.setStringFileInfo(readStringFileInfo(dr, length));
return vi;
}