Skip to content

[WIP] Epic manifest parsing#71

Open
devedse wants to merge 17 commits intomasterfrom
EpicManifestParsing
Open

[WIP] Epic manifest parsing#71
devedse wants to merge 17 commits intomasterfrom
EpicManifestParsing

Conversation

@devedse
Copy link
Owner

@devedse devedse commented May 6, 2025

No description provided.

@codecov
Copy link

codecov bot commented May 6, 2025

Codecov Report

Attention: Patch coverage is 11.05425% with 1738 lines in your changes missing coverage. Please review.

Project coverage is 12.15%. Comparing base (4e0adb9) to head (4b36e14).

Files with missing lines Patch % Lines
...ckend.EpicManifestParser/UE/FFileManifestStream.cs 11.41% 225 Missing ⚠️
...nd.EpicManifestParser/UE/FBuildPatchAppManifest.cs 17.96% 210 Missing ⚠️
...20250511104218_EpicManifestsAndRewrite.Designer.cs 0.00% 203 Missing ⚠️
...ions/20250506212325_AsyncLogEntryTable.Designer.cs 0.00% 178 Missing ⚠️
...acheUI_Backend.EpicManifestParser/UE/FChunkInfo.cs 19.12% 148 Missing ⚠️
...Migrations/DeveLanCacheUIDbContextModelSnapshot.cs 0.00% 110 Missing ⚠️
...LanCacheUI_Backend/Services/EpicManifestService.cs 5.97% 63 Missing ⚠️
...anCacheUI_Backend/Services/SteamManifestService.cs 8.95% 61 Missing ⚠️
...eUI_Backend.EpicManifestParser/Api/ManifestInfo.cs 17.39% 57 Missing ⚠️
...eUI_Backend.EpicManifestParser/UE/FFileManifest.cs 29.03% 44 Missing ⚠️
... and 25 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
- Coverage   12.67%   12.15%   -0.53%     
==========================================
  Files          70       96      +26     
  Lines        3005     4836    +1831     
  Branches      183      392     +209     
==========================================
+ Hits          381      588     +207     
- Misses       2624     4248    +1624     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@devedse devedse requested a review from Copilot May 11, 2025 13:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for parsing Epic manifest files by adding several new enums for versioning and storage flags, decompressor implementations, JSON helper extensions, API methods for downloading and caching manifests, and accompanying tests.

  • Added new enums for various UE manifest flags and versions.
  • Introduced two decompressor implementations and configuration options for manifest parsing.
  • Implemented JSON extensions and APIs to download, parse, and cache manifest files.

Reviewed Changes

Copilot reviewed 57 out of 57 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
UE/EManifestStorageFlags.cs New enum for managing raw, compressed, and encrypted storage flags.
UE/EManifestMetaVersion.cs New enum for tracking manifest meta versions.
UE/EFileMetaFlags.cs New enum for file meta flags with read-only and compression options.
UE/EFileManifestListVersion.cs New enum for file manifest list versioning.
UE/EFeatureLevel.cs New enum architecture for indicating feature levels with several version aliases.
UE/EChunkVersion.cs New enum for chunk versioning.
UE/EChunkStorageFlags.cs New enum for chunk storage flags.
UE/EChunkHashFlags.cs New enum for managing chunk hash flags.
UE/EChunkDataListVersion.cs New enum for chunk data list versioning.
ManifestZlibStreamDecompressor.cs Implementation of a decompressor using ZLibStream.
ManifestParseOptions.cs New configuration options for manifest parsing and caching.
Json/JsonNodeExtensions.cs Provides extension methods for JSON node deserialization.
Json/BlobString.cs New implementation and JSON converter for BlobString types.
GlobalUsings.cs Global using definitions with conditional compilation for NET9_0_OR_GREATER.
EpicManifestParser.cs Entry point for deserializing manifest buffers.
Decompressor/ManifestZlibDotNetDecompressor.cs Alternative decompressor using ZLib and Deflate streams.
Api/ManifestInfo.cs API for downloading, parsing, and caching manifest files.
Tests/EpicManifestParserTests.cs Unit test to verify manifest parsing functionality.
Tests/DeveLanCacheUI_Backend.EpicManifestParser.Tests.csproj Test project configuration update.

Comment on lines +21 to +22
// Make sure the buffer is at least half the size and that the string is an
// even number of characters long
Copy link

Copilot AI May 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a clarifying comment explaining the rationale behind dividing source.Length by 3 and enforcing a remainder of 0 to improve readability and maintainability of the conversion logic.

Suggested change
// Make sure the buffer is at least half the size and that the string is an
// even number of characters long
// Ensure the input length is compatible with processing 3 characters at a time.
// The input length must be divisible by 3 (no remainder) to allow grouping
// into triplets, and the destination buffer must be large enough to hold
// the resulting converted data.

Copilot uses AI. Check for mistakes.
static ReadOnlySpan<char> GetFileName(Uri uri)
{
var span = uri.OriginalString.AsSpan();
return span[(span.LastIndexOf('/') + 1)..];
Copy link

Copilot AI May 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider handling the case where the URI ends with a slash to avoid returning an empty file name, which could lead to incorrect cache path resolution.

Suggested change
return span[(span.LastIndexOf('/') + 1)..];
var lastSlashIndex = span.LastIndexOf('/');
if (lastSlashIndex == span.Length - 1)
{
// URI ends with a slash, return a default file name
return "index".AsSpan();
}
return span[(lastSlashIndex + 1)..];

Copilot uses AI. Check for mistakes.
@devedse
Copy link
Owner Author

devedse commented May 12, 2025

@Pingger

I got Epic Manifest parsing working 🙂

Anyone who's willing to do some beta testing for me with the following docker images?:
devedse/develancacheui_backend:beta_EpicManifestParsing
devedse/develancacheui_frontend:beta_EpicManifestParsing_FrontendPart

image

@Pingger
Copy link

Pingger commented May 13, 2025

For now the Download size seems to match, but the Game is always EpicGamesLauncher or unknown for me.
Screenshot 2025-05-13 at 12-51-09 Latest Downloads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants