import { msgpack } from "https://deno.land/x/s3si@gui-v0.4.16/deps.ts";
const { Encoder } = msgpack;
Constructors
new
Encoder(extensionCodec?: ExtensionCodecType<ContextType>,
context?: ContextType,
maxDepth?,
initialBufferSize?,
sortKeys?,
forceFloat32?,
ignoreUndefined?,
Methods
private
countWithoutUndefined(object: Record<string, unknown>, keys: ReadonlyArray<string>): numberprivate
doEncode(object: unknown, depth: number): voidprivate
encodeArray(object: Array<unknown>, depth: number)private
encodeBinary(object: ArrayBufferView)private
encodeBoolean(object: boolean)private
encodeExtension(ext: ExtData)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(): Uint8Arrayprivate
reinitializeState()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