private void SerializeFileInfoListEntry(uint id) { _writer.Write(HashFunctions.LeagueHash(_files[id].Path)); _writer.Write(_files[id].DataOffset); _writer.Write(_files[id].DataLength); _writer.Write(id); }
private void ProcessData() { _archive.Files = new Dictionary <string, ArchiveFileInfo>(); for (uint i = 0; i < _fileList.Length; i++) { var result = new ArchiveFileInfo(); result.Path = ReadString(_pathListOffset + _pathList[_fileList[i].PathIndex].PathOffset, _pathList[_fileList[i].PathIndex].PathLength - 1); if (_fileList[i].PathHash != HashFunctions.LeagueHash(result.Path)) { Console.WriteLine("Invalid hash for a path: {0}", result.Path); continue; } result.DataOffset = _fileList[i].DataOffset; result.DataLength = _fileList[i].DataLength; _archive.Files.Add(result.Path, result); } }