MCPcopy Create free account
hub / github.com/segmentio/encoding / encodeInt64

Function encodeInt64

proto/int64.go:21–28  ·  view source on GitHub ↗
(b []byte, p unsafe.Pointer, flags flags)

Source from the content-addressed store, hash-verified

19}
20
21func encodeInt64(b []byte, p unsafe.Pointer, flags flags) (int, error) {
22 if p != nil {
23 if v := *(*int64)(p); v != 0 || flags.has(wantzero) {
24 return encodeVarint(b, flags.uint64(v))
25 }
26 }
27 return 0, nil
28}
29
30func decodeInt64(b []byte, p unsafe.Pointer, flags flags) (int, error) {
31 v, n, err := decodeVarint(b)

Callers

nothing calls this directly

Calls 3

encodeVarintFunction · 0.85
uint64Method · 0.80
hasMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…