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

Function DecodeUint16Ascending

pkg/util/encoding/encoding.go:232–238  ·  view source on GitHub ↗

DecodeUint16Ascending decodes a uint16 from the input buffer, treating the input as a big-endian 2 byte uint16 representation. The remainder of the input buffer and the decoded uint16 are returned.

(b []byte)

Source from the content-addressed store, hash-verified

230// the input as a big-endian 2 byte uint16 representation. The remainder
231// of the input buffer and the decoded uint16 are returned.
232func DecodeUint16Ascending(b []byte) ([]byte, uint16, error) {
233 if len(b) < 2 {
234 return nil, 0, errors.Errorf("insufficient bytes to decode uint16 int value")
235 }
236 v := binary.BigEndian.Uint16(b)
237 return b[2:], v, nil
238}
239
240// DecodeUint32Ascending decodes a uint32 from the input buffer, treating
241// the input as a big-endian 4 byte uint32 representation. The remainder

Callers 4

DecodeTSVectorFunction · 0.92
DecodeTSVectorPGBinaryFunction · 0.92
decodeTSNodeMethod · 0.92
decodeTSNodePGBinaryMethod · 0.92

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…