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

Function ReadStringAsBytes

msgp/read_bytes.go:1005–1010  ·  view source on GitHub ↗

ReadStringAsBytes reads a 'str' object into a slice of bytes. 'v' is the value of the 'str' object, which may reside in memory pointed to by 'scratch.' 'o' is the remaining bytes in 'b'. Possible errors: - [ErrShortBytes] (b not long enough) - [TypeError] (not 'str' type) - [InvalidPrefixError] (u

(b []byte, scratch []byte)

Source from the content-addressed store, hash-verified

1003// - [TypeError] (not 'str' type)
1004// - [InvalidPrefixError] (unknown type marker)
1005func ReadStringAsBytes(b []byte, scratch []byte) (v []byte, o []byte, err error) {
1006 var tmp []byte
1007 tmp, o, err = ReadStringZC(b)
1008 v = append(scratch[:0], tmp...)
1009 return
1010}
1011
1012// ReadComplex128Bytes reads a complex128
1013// extension object from 'b' and returns the

Callers 1

FuzzReadBytesFunction · 0.85

Calls 1

ReadStringZCFunction · 0.85

Tested by 1

FuzzReadBytesFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…