Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/encoding/binary.ts>putVarbig

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function putVarbig
import { putVarbig } from "https://deno.land/std@0.176.0/encoding/binary.ts";

Encodes bigint x into b. Returns the number of bytes used, or 0 if b is shorter than sizeof(o.dataType).

o.dataType defaults to "int64".

Parameters

b: Uint8Array
x: bigint
optional
o: VarbigOptions = [UNSUPPORTED]

Returns

number