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

x/kwik/deps.ts>msgpack.Encoder

Kwik is a deno database using messagepack files.
Latest
class msgpack.Encoder
Re-export
import { msgpack } from "https://deno.land/x/kwik@v1.3.1/deps.ts";
const { Encoder } = msgpack;

Constructors

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

Type Parameters

optional
ContextType = undefined

Properties

private
bytes
private
readonly
context
private
countWithoutUndefined
private
doEncode
private
encodeArray
private
encodeBinary
private
encodeBoolean
private
encodeExtension
private
encodeMap
private
encodeNil
private
encodeNumber
private
encodeObject
private
encodeString
private
ensureBufferSizeToWrite
private
readonly
extensionCodec
private
readonly
forceFloat32
private
readonly
forceIntegerToFloat
private
getUint8Array
private
readonly
ignoreUndefined
private
readonly
initialBufferSize
private
readonly
maxDepth
private
pos
private
reinitializeState
private
resizeBuffer
private
readonly
sortKeys
private
view
private
writeF32
private
writeF64
private
writeI16
private
writeI32
private
writeI64
private
writeI8
private
writeStringHeader
private
writeU16
private
writeU32
private
writeU64
private
writeU8
private
writeU8a

Methods

encode(object: unknown): Uint8Array