// Copyright (c) StellaOps. All rights reserved. // Licensed under AGPL-3.0-or-later. See LICENSE in the project root. using System.Collections.Immutable; namespace StellaOps.Scanner.ChangeTrace.ByteDiff; /// /// Options for byte-level diffing. /// public sealed record ByteDiffOptions { /// /// Rolling hash window size in bytes. Default: 2048. /// public int WindowSize { get; init; } = 2048; /// /// Step size for window advancement. Default: WindowSize (non-overlapping). /// public int StepSize { get; init; } = 2048; /// /// Maximum file size to analyze in bytes. Default: 10MB. /// public long MaxFileSize { get; init; } = 10 * 1024 * 1024; /// /// Whether to analyze by ELF/PE section. Default: true. /// public bool AnalyzeBySections { get; init; } = true; /// /// Sections to include (e.g., ".text", ".data"). Null = all sections. /// public ImmutableArray? IncludeSections { get; init; } /// /// Whether to include context description in output. Default: false. /// public bool IncludeContext { get; init; } = false; /// /// Enable parallel processing for large files. Default: true. /// public bool EnableParallel { get; init; } = true; /// /// Minimum number of consecutive changed windows to report. Default: 1. /// public int MinConsecutiveChanges { get; init; } = 1; /// /// Create default options. /// public static ByteDiffOptions Default { get; } = new(); }