MCPcopy Create free account
hub / github.com/distributedio/titan / encode

Method encode

db/string.go:267–271  ·  view source on GitHub ↗

encode because of the value is small size , value and meta decode together

()

Source from the content-addressed store, hash-verified

265
266// encode because of the value is small size , value and meta decode together
267func (s *String) encode() []byte {
268 b := EncodeObject(&s.Meta.Object)
269 b = append(b, s.Meta.Value...)
270 return b
271}
272
273// decode if obj has been existed , stop parse
274func (s *String) decode(b []byte) error {

Callers 2

SetMethod · 0.95
AppendMethod · 0.95

Calls 1

EncodeObjectFunction · 0.85

Tested by

no test coverage detected