readBigQuicVarint
readBigQuicVarint(
reader):bigint
Defined in: packages/format-varint/src/quic/read-big-quic-varint.ts:23
Reads one QUIC variable-length integer from reader as a bigint, advancing
it past the bytes consumed — the full-range counterpart of
readQuicVarint, up to 2^62 - 1.
QUIC and HTTP/3 grease values (0x1f * N + 0x21) reach that range, so a
reader that must skip unknown identifiers rather than fail on them needs it.
Prefer readQuicVarint where the value is known to fit a number;
bigint arithmetic is slower and allocates.
Time complexity: O(1).
Parameters
Section titled “Parameters”reader
Section titled “reader”ByteReader
Cursor positioned at the first byte of the encoding.
Returns
Section titled “Returns”bigint
The decoded value, from 0 to 2^62 - 1.
Throws
Section titled “Throws”When fewer bytes remain than the length prefix announces.