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

std/encoding/binary.ts>readVarbig

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

Reads an integer from r, comsuming sizeof(o.dataType) bytes. Data-type defaults to int64.

Returns it as bigint, or throws Deno.errors.UnexpectedEof if not enough bytes can be read.

Parameters

r: Deno.Reader
optional
o: VarbigOptions = [UNSUPPORTED]

Returns

Promise<bigint>