import * as mod from "https://deno.land/std@0.222.0/encoding/varint.ts";
Functions for encoding typed integers in array buffers.
import { encode, decode } from "https://deno.land/std@0.222.0/encoding/varint.ts";
const buf = new Uint8Array(10);
const [encoded, bytesWritten] = encode(42n, buf);
// [ Uint8Array(1) [ 42 ], 1 ];
decode(encoded); // [ 42n, 1 ];
Variables
Functions for encoding typed integers in array buffers. | |
Functions
Given a non empty | |
Given a | |
Given a non empty | |
Given a | |
Takes unsigned number | |
Takes unsigned number |