LANCommander/LANCommander.Server.Services/Models/ArchiveStreamingReport.cs
Pat Hartl 24eaa79885 Add tool to repack non-streamable ZIP archives
Adds a tool that checks archives to see if they use data descriptors instead of local entry headers for tracking entry size. It will also repack these archives if required.
2026-06-22 19:18:11 -05:00

31 lines
1.1 KiB
C#

namespace LANCommander.Server.Services.Models
{
/// <summary>
/// The result of inspecting a game archive for layouts that the launcher's forward-only
/// (streaming) extractor cannot read reliably.
/// </summary>
public class ArchiveStreamingReport
{
/// <summary>
/// True when no entries require a repack to be safely streamed by the launcher.
/// </summary>
public bool IsStreamingSafe => ProblemEntries.Count == 0;
/// <summary>
/// Total number of entries found in the archive's central directory.
/// </summary>
public int TotalEntries { get; set; }
/// <summary>
/// Entries that cannot be reliably extracted by a streaming reader.
/// </summary>
public List<ArchiveStreamingProblemEntry> ProblemEntries { get; set; } = new();
}
public class ArchiveStreamingProblemEntry
{
public string Name { get; set; } = string.Empty;
public long UncompressedSize { get; set; }
public string Reason { get; set; } = string.Empty;
}
}