import { MaxUInt64 } 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 ];