Function readFileBlock
Decode one complete PBF file block from cursor.
FrameReadResult readFileBlock(
ref WireCursor cursor,
ulong sequence,
out FileBlockView block,
out PbfStatus status
) nothrow @nogc @safe;
Parameters
| Name | Description |
|---|---|
| cursor | Cursor over the remaining PBF file bytes. |
| sequence | Sequence number to attach to the returned block view. |
| block | Receives the borrowed block view on success. |
| status | Receives success or the framing failure. |
Returns
FrameReadResult for one decoded block,
FrameReadResult when called exactly at clean EOF, or
FrameReadResult for malformed/truncated input.
Notes
On error the caller's cursor is not advanced. On success it advances by
exactly block bytes. No memory is allocated.