Decode a value from the MessagePack binary format.
If the input is not in valid message pack format, an error will be thrown.
MessagePack binary data.
Decoded value from the MessagePack binary data.
import { decode } from "@std/msgpack/decode";import { assertEquals } from "@std/assert";const encoded = new Uint8Array([163, 72, 105, 33]);assertEquals(decode(encoded), "Hi!"); Copy
import { decode } from "@std/msgpack/decode";import { assertEquals } from "@std/assert";const encoded = new Uint8Array([163, 72, 105, 33]);assertEquals(decode(encoded), "Hi!");
Decode a value from the MessagePack binary format.
If the input is not in valid message pack format, an error will be thrown.