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

Function NewMessagePackEncoder

lib/encoding/messagepack.go:43–53  ·  view source on GitHub ↗

NewMessagePackEncoder function creates new MessagePackCodecEncoder and initializes it.

()

Source from the content-addressed store, hash-verified

41
42// NewMessagePackEncoder function creates new MessagePackCodecEncoder and initializes it.
43func NewMessagePackEncoder() *MessagePackCodecEncoder {
44 msgPack := NewMsgPackHandle()
45 b := make([]byte, 0)
46 return &MessagePackCodecEncoder{
47 MessagePackCodec: MessagePackCodec{
48 MsgPack: msgPack,
49 b: &b,
50 enc: codec.NewEncoderBytes(&b, msgPack),
51 },
52 }
53}
54
55// NewMessagePackDecoder function takes in a byte slice, and returns a pointer to newly created
56// and initialized MessagePackCodecDecoder

Callers 8

setSetToDBMethod · 0.92
BytesMethod · 0.92
setZSetToDBMethod · 0.92
MarshalBinaryMethod · 0.92
MarshalBinaryMethod · 0.92
TestAddExtensionFunction · 0.85

Calls 1

NewMsgPackHandleFunction · 0.85

Tested by 3

TestAddExtensionFunction · 0.68