Skip to content

writeVlq

writeVlq(target, offset, value): number

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

Writes value into target at offset, most significant group first.

The in-place counterpart of encodeVlq, for a caller assembling several values into one buffer without allocating per value.

Uint8Array

Destination, which must hold vlqByteLength 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.