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)
| 1003 | // - [TypeError] (not 'str' type) |
| 1004 | // - [InvalidPrefixError] (unknown type marker) |
| 1005 | func 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 |
searching dependent graphs…