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.38.0/encoding/binary.ts";

Encode an integer x into b, and return the number of bytes used. Data-type defaults to int64. Returns 0 if b is too short for the data-type given in o.

Parameters

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

Returns

number