MCPcopy Index your code
hub / github.com/ByteStorage/FlyDB / NewMessagePackDecoder

Function NewMessagePackDecoder

lib/encoding/messagepack.go:57–66  ·  view source on GitHub ↗

NewMessagePackDecoder function takes in a byte slice, and returns a pointer to newly created and initialized MessagePackCodecDecoder

(b []byte)

Source from the content-addressed store, hash-verified

55// NewMessagePackDecoder function takes in a byte slice, and returns a pointer to newly created
56// and initialized MessagePackCodecDecoder
57func NewMessagePackDecoder(b []byte) *MessagePackCodecDecoder {
58 msgPack := NewMsgPackHandle()
59 return &MessagePackCodecDecoder{
60 MessagePackCodec: &MessagePackCodec{
61 MsgPack: msgPack,
62 b: &b,
63 dec: codec.NewDecoderBytes(b, msgPack),
64 },
65 }
66}
67
68// Encode method for MessagePackCodec. It encodes the input value into a byte slice using MessagePack.
69// Returns encoded byte slice or error.

Callers 8

getSetFromDBMethod · 0.92
FromBytesMethod · 0.92
getZSetFromDBMethod · 0.92
UnmarshalBinaryMethod · 0.92
UnmarshalBinaryMethod · 0.92
TestAddExtensionFunction · 0.85

Calls 1

NewMsgPackHandleFunction · 0.85

Tested by 3

TestAddExtensionFunction · 0.68