Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/s3si/deps.ts>msgpack.encode

Export your battles from SplatNet to https://stat.ink
Go to Latest
function msgpack.encode
import { msgpack } from "https://deno.land/x/s3si@gui-v0.4.2/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