glepack/decode
This module provides functions to decode MessagePack data
Functions
pub fn value(
input: BitArray,
) -> Result(#(Value, BitArray), DecodeError)
Decodes a MessagePack value from a BitArray Returns a tuple with the decoded value and the remaining BitArray
Errors
This function can return the following errors:
InvalidFormat
: When the input data is not valid MessagePackIncompleteData
: When the input data is incomplete and more bytes are neededIntegerTooLarge
: When the input contains an integer that is too large for Gleam’s Int typeInvalidUtf8
: When the input contains a string that is not valid UTF-8ReservedFormat
: When the input contains a reserved format (0xc1)UnknownFormat
: When an unknown format was encounteredUnsupportedExtension
: When the input contains an extension type that is not supported