MCPcopy
hub / github.com/tinylib/msgp / ReadBytesZC

Function ReadBytesZC

msgp/read_bytes.go:866–868  ·  view source on GitHub ↗

ReadBytesZC extracts the messagepack-encoded binary field without copying. The returned []byte points to the same memory as the input slice. Possible errors: - [ErrShortBytes] (b not long enough) - [TypeError] (object not 'bin')

(b []byte)

Source from the content-addressed store, hash-verified

864// - [ErrShortBytes] (b not long enough)
865// - [TypeError] (object not 'bin')
866func ReadBytesZC(b []byte) (v []byte, o []byte, err error) {
867 return readBytesBytes(b, nil, true)
868}
869
870func ReadExactBytes(b []byte, into []byte) (o []byte, err error) {
871 if len(b) < 1 {

Callers 4

TestReadZCBytesFunction · 0.85
FuzzReadBytesFunction · 0.85
rwBytesBytesFunction · 0.85
ReadMapKeyZCFunction · 0.85

Calls 1

readBytesBytesFunction · 0.85

Tested by 2

TestReadZCBytesFunction · 0.68
FuzzReadBytesFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…