Module osm.io.pbf.blob_header

Zero-copy decoder for the OSMPBF BlobHeader protobuf message.

The decoder extracts the three fields defined by fileformat.proto while preserving the complete original serialized header as BlobHeaderView.raw. Unknown non-group fields are skipped according to protobuf wire rules and remain available in the raw bytes for future lossless handling. Deprecated protobuf groups currently fail closed because the generic wire layer does not yet implement bounded nested-group skipping. Singular known fields follow normal protobuf parsing behavior: a later correctly encoded occurrence replaces an earlier one.

The protobuf string field type is exposed as bytes at this layer. UTF-8 policy is intentionally not imposed here because invalid-string handling is still an explicit compatibility decision in docs/SPEC_MATRIX.md.

Date

2026-09-12

Functions

NameDescription
classifyBlobType(type) Classify a BlobHeader type byte sequence.
decodeBlobHeader(input, header, status) Decode one complete serialized BlobHeader message.

Structs

NameDescription
BlobHeaderView Borrowed view of a decoded BlobHeader message.

Enums

NameDescription
BlobKind Semantic classification of the standard OSMPBF file-block type strings.