MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / DecodeUint64Ascending

Function DecodeUint64Ascending

pkg/util/encoding/encoding.go:278–284  ·  view source on GitHub ↗

DecodeUint64Ascending decodes a uint64 from the input buffer, treating the input as a big-endian 8 byte uint64 representation. The remainder of the input buffer and the decoded uint64 are returned.

(b []byte)

Source from the content-addressed store, hash-verified

276// the input as a big-endian 8 byte uint64 representation. The remainder
277// of the input buffer and the decoded uint64 are returned.
278func DecodeUint64Ascending(b []byte) ([]byte, uint64, error) {
279 if len(b) < 8 {
280 return nil, 0, errors.Errorf("insufficient bytes to decode uint64 int value")
281 }
282 v := binary.BigEndian.Uint64(b)
283 return b[8:], v, nil
284}
285
286// DecodeUint64Descending decodes a uint64 value which was encoded
287// using EncodeUint64Descending.

Callers 5

DecodeUint64DescendingFunction · 0.85
DecodeGeoAscendingFunction · 0.85
DecodeUntaggedFloatValueFunction · 0.85
DecodeFloatAscendingFunction · 0.85

Calls 2

ErrorfMethod · 0.80
Uint64Method · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…