Skip to content

writeQuicVarint

writeQuicVarint(target, offset, value): number

Defined in: packages/format-varint/src/quic/write-quic-varint.ts:17

Writes value into target at offset as a QUIC variable-length integer, in the shortest form that holds it.

The in-place counterpart of encodeQuicVarint, for a caller assembling a frame without allocating per value.

Uint8Array

Destination, which must hold quicVarintByteLength bytes from offset.

number

Where to start writing.

number

A non-negative safe integer.

number

The offset just past the bytes written.

When value is out of range, or target is too short.