decodeUint64

fnResult!(Varint64, VarintError) decodeUint64(scope const(ubyte)[] src) @safe pure nothrow @nogc

Decodes one canonical 64-bit varint from src.

Parameters

srcinput starting at the varint.

Returns

Result!(Varint64, VarintError): value plus bytes consumed

(1–10) on success. Failures, with examined set to the byte count at detection:

  • TRUNCATED — input ended inside the varint.
  • OVERLONG — non-canonical form (final byte zero with

    more than one byte).

  • OVERFLOW — payload bits beyond 64 (10th byte > 1).