MCPcopy Create free account
hub / github.com/google/pprof / decodeInt64s

Function decodeInt64s

profile/proto.go:297–321  ·  view source on GitHub ↗
(b *buffer, x *[]int64)

Source from the content-addressed store, hash-verified

295}
296
297func decodeInt64s(b *buffer, x *[]int64) error {
298 if b.typ == 2 {
299 // Packed encoding
300 dataLen := peekNumVarints(b.data)
301 *x = slices.Grow(*x, dataLen)
302
303 data := b.data
304 for len(data) > 0 {
305 var u uint64
306 var err error
307
308 if u, data, err = decodeVarint(data); err != nil {
309 return err
310 }
311 *x = append(*x, int64(u))
312 }
313 return nil
314 }
315 var i int64
316 if err := decodeInt64(b, &i); err != nil {
317 return err
318 }
319 *x = append(*x, i)
320 return nil
321}
322
323func decodeUint64(b *buffer, x *uint64) error {
324 if err := checkType(b, 0); err != nil {

Callers 1

encode.goFile · 0.85

Calls 3

peekNumVarintsFunction · 0.85
decodeVarintFunction · 0.85
decodeInt64Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…