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

x/s3si/deps.ts>msgpack.Encoder

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

Constructors

new
Encoder(
extensionCodec?: ExtensionCodecType<ContextType>,
context?: ContextType,
maxDepth?,
initialBufferSize?,
sortKeys?,
forceFloat32?,
ignoreUndefined?,
)

Type Parameters

ContextType

Properties

private
bytes
private
pos: number
private
view

Methods

private
countWithoutUndefined(object: Record<string, unknown>, keys: ReadonlyArray<string>): number
private
doEncode(object: unknown, depth: number): void
private
encodeArray(object: Array<unknown>, depth: number)
private
encodeBinary(object: ArrayBufferView)
private
encodeBoolean(object: boolean)
private
encodeMap(object: Record<string, unknown>, depth: number)
private
encodeNil()
private
encodeNumber(object: number)
private
encodeObject(object: unknown, depth: number)
private
encodeString(object: string)
private
ensureBufferSizeToWrite(sizeToWrite: number)
private
getUint8Array(): Uint8Array
private
resizeBuffer(newSize: number)
private
writeF32(value: number)
private
writeF64(value: number)
private
writeI16(value: number)
private
writeI32(value: number)
private
writeI64(value: number)
private
writeI8(value: number)
private
writeStringHeader(byteLength: number)
private
writeU16(value: number)
private
writeU32(value: number)
private
writeU64(value: number)
private
writeU8(value: number)
private
writeU8a(values: ArrayLike<number>)
encode(object: unknown): Uint8Array