Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/s3si/deps.ts>msgpack.encode

Export your battles from SplatNet to stat.ink
Go to Latest
function msgpack.encode
import { msgpack } from "https://deno.land/x/s3si@v0.1.8/deps.ts";
const { encode } = msgpack;

It encodes value in the MessagePack format and returns a byte buffer.

The returned buffer is a slice of a larger ArrayBuffer, so you have to use its #byteOffset and #byteLength in order to convert it to another typed arrays including NodeJS Buffer.

Type Parameters

ContextType

Parameters

value: unknown
optional
options: EncodeOptions<SplitUndefined<ContextType>> = [UNSUPPORTED]

Returns

Uint8Array