MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / DecodeUint32Ascending

Function DecodeUint32Ascending

pkg/util/encoding/encoding.go:165–171  ·  view source on GitHub ↗

DecodeUint32Ascending decodes a uint32 from the input buffer, treating the input as a big-endian 4 byte uint32 representation. The remainder of the input buffer and the decoded uint32 are returned.

(b []byte)

Source from the content-addressed store, hash-verified

163// the input as a big-endian 4 byte uint32 representation. The remainder
164// of the input buffer and the decoded uint32 are returned.
165func DecodeUint32Ascending(b []byte) ([]byte, uint32, error) {
166 if len(b) < 4 {
167 return nil, 0, errors.Errorf("insufficient bytes to decode uint32 int value")
168 }
169 v := binary.BigEndian.Uint32(b)
170 return b[4:], v, nil
171}
172
173// DecodeUint32Descending decodes a uint32 value which was encoded
174// using EncodeUint32Descending.

Callers 3

decodeJEntryFunction · 0.92
DecodeJSONFunction · 0.92
DecodeUint32DescendingFunction · 0.85

Calls 1

Uint32Method · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…