encodeWithCodec
encodeWithCodec(
instance,input,mediaType):Promise<Uint8Array<ArrayBufferLike>>
Defined in: astrobase/src/codecs/codecs.ts:90
Encodes data into binary using the Codec for the media type, plus Middlewares, provided by the instance.
Parameters
Section titled “Parameters”instance
Section titled “instance”The instance that provides the Codec & Middlewares.
unknown
The data to encode.
mediaType
Section titled “mediaType”The media type of the encoding.
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
A promise that resolves with the encoded binary.