Skip to main content
Module

std/encoding/binary.ts>readVarnum

Deno standard library
Go to Latest
function readVarnum
import { readVarnum } from "https://deno.land/std@0.65.0/encoding/binary.ts";

Decodes a number from r, comsuming sizeof(o.dataType) bytes. If less than sizeof(o.dataType) bytes were read, throws Deno.errors.unexpectedEof.

o.dataType defaults to "int32".

Parameters

optional
o: VarnumOptions = [UNSUPPORTED]

Returns

Promise<number>