Module osm.io.pbf.document_reader
Materialize a durable, loss-aware PBF document from an already-loaded file.
This is the allocation boundary between Phase-3 borrowed decoding and the M4 owned model. The implementation deliberately favors correctness and contract clarity over single-pass throughput: each element kind uses the existing fully validating foreach reader boundary and copies only its own semantics. M6 may later add direct PBF-to-store construction without changing this document contract.
Exact input bytes are captured before validation. Therefore malformed or semantically unsupported input can still be retained for inspection even when owned semantic materialization fails.
This API consumes an already-loaded byte sequence. Filesystem, HTTP, range
access and sequential stream adaptation belong to the workspace
transport-d layer rather than this codec. See ADR 0019.
Date
2026-11-03
Functions
| Name | Description |
|---|---|
readPbfDocument(input, document, status)
|
Decode input into durable semantic values while retaining exact source.
|