Skip to main content
Module

std/encoding/mod.ts>readVarbig

Deno standard library
Go to Latest
function readVarbig
import { readVarbig } from "https://deno.land/std@0.38.0/encoding/mod.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

optional
o: VarbigOptions = [UNSUPPORTED]

Returns

Promise<bigint>