Skip to content

quicVarintByteLength

quicVarintByteLength(value): 1 | 2 | 4 | 8

Defined in: packages/format-varint/src/quic/quic-varint-byte-length.ts:10

How many bytes encodeQuicVarint will produce for value: the shortest of the four QUIC lengths that holds it.

number

A non-negative safe integer.

1 | 2 | 4 | 8

1, 2, 4 or 8.

When value is negative, fractional, or beyond Number.MAX_SAFE_INTEGER.