ModernUO/Projects/UOContent.Tests/Tests/Engines/Pathing
Kamron Batman 94537f83f8
feat(pathfinding): .swb format v6 predictive-Z residuals (#2469)
## Summary
Phase #2 of the `.swb` step-cache size-reduction roadmap (after #2465, v5 uniform elision). Stores the 16 base directional Z arrays as masked residuals against each cell's own SourceZ and omits any array that matches its prediction. Lossless, byte-identical reconstruction.

Trammel: 231.9 MB → 124.7 MB (−46%).

## Details
- Predictor: `predict = mask bit ? SourceZ : 0` (matches the baker's 0 on unwalkable directions); residual `Z − predict` via unchecked two's-complement (byte-exact for all inputs); reconstruct `Z = predict + residual`.
- A `u16 ZArrayMask` flags which of the 16 base arrays differ from prediction; matching arrays are omitted and synthesized from mask + SourceZ at read.
- Serializer-layer only: StepChunk, the cache, the algorithm, and the baker are unchanged.
- Format v6; v5 files rejected and re-baked once.

## Tests
21 v6 unit tests; full pathfinding suite green; Release build clean.
2026-06-07 00:12:08 -07:00
..
BitmapAStarAlgorithmTests.cs feat(pathfinding): non-eager TryGetMask + second-touch promotion (#2451) 2026-06-06 13:11:53 -07:00
PathfindRecorderTests.cs feat(pathfinding): JSONL recorder + public bake helpers (#2449) 2026-05-06 13:06:28 -07:00
StepCacheFileTests.cs feat(pathfinding): non-eager TryGetMask + second-touch promotion (#2451) 2026-06-06 13:11:53 -07:00
StepCacheFileV6Tests.cs feat(pathfinding): .swb format v6 predictive-Z residuals (#2469) 2026-06-07 00:12:08 -07:00
StepCacheLifecycleTests.cs feat(pathfinding): non-eager TryGetMask + second-touch promotion (#2451) 2026-06-06 13:11:53 -07:00
StepCacheParityTests.cs feat(pathfinding): non-eager TryGetMask + second-touch promotion (#2451) 2026-06-06 13:11:53 -07:00
StepCacheStaticSurfaceParityTests.cs feat(pathfinding): non-eager TryGetMask + second-touch promotion (#2451) 2026-06-06 13:11:53 -07:00
StepProbeParityTests.cs feat: expand cache to nearly all mobiles + dynamic-obstacle pass (#2447) 2026-05-06 00:14:08 -07:00
StepProbeTests.cs feat: expand cache to nearly all mobiles + dynamic-obstacle pass (#2447) 2026-05-06 00:14:08 -07:00