.nornir/assets/single-pass-vtd.svg
<svg xmlns="http://www.w3.org/2000/svg" width="760" height="260" font-family="monospace" font-size="13">
<style>
.box{fill:#12324a;stroke:#6fd3f5;stroke-width:1.5;rx:6}
.disc{fill:#3a2a12;stroke:#e0a85a;stroke-width:1.5}
.store{fill:#123a1e;stroke:#7fe0a0;stroke-width:1.5}
.t{fill:#dfeaf2}.dim{fill:#8fb0c4}.acc{fill:#e0a85a}
.arr{stroke:#6fd3f5;stroke-width:1.5;fill:none;marker-end:url(#a)}
</style>
<defs><marker id="a" markerWidth="9" markerHeight="9" refX="7" refY="3" orient="auto">
<path d="M0,0 L7,3 L0,6 Z" fill="#6fd3f5"/></marker></defs>
<rect class="box" x="14" y="24" width="150" height="52" rx="6"/>
<text class="t" x="24" y="46">bz2 stream</text>
<text class="dim" x="24" y="64">non-seekable</text>
<rect class="box" x="200" y="24" width="200" height="52" rx="6"/>
<text class="t" x="212" y="46">BoundaryDetector</text>
<text class="dim" x="212" y="64"><way / <relation, streaming</text>
<line class="arr" x1="164" y1="50" x2="200" y2="50"/>
<text class="dim" x="166" y="42">chunks</text>
<rect class="disc" x="14" y="150" width="300" height="70" rx="6"/>
<text class="acc" x="26" y="176">① node prologue</text>
<text class="t" x="26" y="196">scan · COUNT · discard</text>
<text class="dim" x="26" y="212">index-only, no store (mandatory decompress)</text>
<rect class="store" x="430" y="150" width="316" height="70" rx="6"/>
<text class="acc" x="442" y="176">② ways + relations</text>
<text class="t" x="442" y="196">store ElemIndex (byte-identical)</text>
<text class="dim" x="442" y="212">offsets absolute in-stream, seek-free</text>
<line class="arr" x1="300" y1="76" x2="160" y2="150"/>
<line class="arr" x1="300" y1="76" x2="500" y2="150"/>
<text class="acc" x="300" y="120">node→way boundary — FLIP</text>
<text class="dim" x="330" y="138">(first <way offset)</text>
</svg>