public PakFile(UE_Reader reader) { reader.BaseStream.Position = reader.BaseStream.Length - 189; Info = new PakInfo(reader, this); reader.BaseStream.Position = Info.IndexOffset; Index = new PakIndex(reader, this); }
static string GetFileInfo(PakEntry entry) { PakInfo info = entry.Index.Pak.Info; var sb = new StringBuilder(); sb.Append($"header_size:{entry.HeaderSize}"); if (entry.Position < 0) { sb.Append(" not_present"); return(sb.ToString()); } // https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings string str_size = String.Format(US_NumFormat, "{0:N0}", entry.UncompressedSize); sb.Append($" size:{str_size}"); if (entry.Encrypted) { sb.Append(" encrypted"); } sb.Append($" compression:{entry.Compression}"); sb.Append($" c_block_count:{entry.PakCompressedBlockCount}"); return(sb.ToString()); }