v1.6.0 — Direct varData properties on DataReader
Added
-
Direct properties for top-level
<data>(varData) on{Msg}DataReader(#162): Each top-level varData field is now also exposed as a property returning the variable-length composite (e.g.VarStringEncoding) computed directly from the buffer. Zero allocation, no callback, no closure capture.if (NewOrderData.TryParse(buffer, out var reader)) { foreach (ref readonly var leg in reader.Legs) { /* ... */ } var coid = reader.ClientOrderId.VarData; // ReadOnlySpan<byte>, zero-alloc }
Each access is stateless — the start offset is recomputed from the buffer by chaining the existing
Skip{Group}helpers (O(1) per simple group) plusSkipData{Prev}for any prior varData. Safe regardless of access order, before/after iterating groups, and across multiple reads. For repeated reads, cache the returned value locally.Gating: emitted only when all top-level groups are simple (no nested groups, no group-level varData) — same gate as the foreach enumerators added in #156. Also valid for messages with only varData and no groups. When a varData name collides with a reserved member of the reader struct, the direct property is silently skipped for that field; it remains reachable via
ReadGroups. -
Benchmark
GroupForeachVsCallbackBenchmarksvalidating the perf premise of the v1.5.0 foreach enumerator API (#156).
Full changelog: v1.5.0...v1.6.0
What's Changed
- bench: foreach vs ReadGroups callback decode benchmark (#156) by @pedrosakuma in #161
- docs: reflect v1.4 / v1.5 features (foreach, AsTrimmedSpan, header helpers) by @pedrosakuma in #160
- feat: direct varData properties (#162) + foreach vs callback bench (#156) by @pedrosakuma in #163
Full Changelog: v1.5.0...v1.6.0