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

Method Bytes

structure/zset.go:1049–1055  ·  view source on GitHub ↗

Bytes encodes the FZSet instance into bytes using MessagePack binary serialization format. The encoded bytes can be used for storage or transmission. If the encoding operation fails, an error is returned.

()

Source from the content-addressed store, hash-verified

1047// storage or transmission. If the encoding operation fails, an
1048// error is returned.
1049func (fzs *FZSet) Bytes() ([]byte, error) {
1050 var msgPack = encoding.NewMessagePackEncoder()
1051 if encodingError := msgPack.Encode(fzs); encodingError != nil {
1052 return nil, encodingError
1053 }
1054 return msgPack.Bytes(), nil
1055}
1056
1057// FromBytes decodes the input byte slice into the FZSet object using MessagePack.
1058// Returns an error if decoding fails, otherwise nil.

Callers 9

GetValueFunction · 0.45
setSetToDBMethod · 0.45
TestSortedSetFunction · 0.45
encodeHashFieldMethod · 0.45
setZSetToDBMethod · 0.45
MarshalBinaryMethod · 0.45
MarshalBinaryMethod · 0.45
bitsetToByteArrayFunction · 0.45
encodeListMethod · 0.45

Calls 2

NewMessagePackEncoderFunction · 0.92
EncodeMethod · 0.45

Tested by 2

GetValueFunction · 0.36
TestSortedSetFunction · 0.36