Module osm.wire.varint
Protobuf base-128 varint decoding.
The decoder accepts legal non-minimal encodings up to the protobuf 64-bit maximum of ten bytes. It rejects truncation and values whose tenth byte contains bits outside bit zero. The common one-byte case has an explicit fast path. The 64-bit decoder is explicitly marked for cross-module inlining because controlled LDC benchmarks found the library boundary otherwise dominates this hot path.
Date
2026-09-12
Functions
| Name | Description |
|---|---|
readSVarint32(cursor, value, status)
|
Decode one protobuf sint32 value.
|
readSVarint64(cursor, value, status)
|
Decode one protobuf sint64 value.
|
readVarint32(cursor, value, status)
|
Decode one protobuf 32-bit varint value. |
readVarint64(cursor, value, status)
|
Decode one unsigned 64-bit protobuf varint. |