Documentation
    Preparing search index...

    Function encode

    • Encodes value into buffer starting at offset. Returns Uint8Array, with the encoded varint written into it. If Uint8Array is not provided, it will default to a new Uint8Array.

      Parameters

      • value: number
      • Optionalbuf: Uint8Array<ArrayBufferLike>
      • Optionaloffset: number = 0

      Returns [buf: Uint8Array<ArrayBufferLike>, size: number]

      • The buffer and the size of the encoded varint