Skip to main content
The Deno 2 Release Candidate is here
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function writeVarnum
Deprecated
Deprecated

(will be removed after 0.205.0) Use WritableStream and DataView instead.

Encodes and writes x to w. Resolves to the number of bytes written.

o.dataType defaults to "int32".

import { writeVarnum } from "https://deno.land/std@0.205.0/encoding/binary.ts";

Parameters

x: number
optional
o: VarnumOptions = [UNSUPPORTED]

Returns

Promise<number>