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

Function DecodeNonsortingStdlibVarint

pkg/util/encoding/encoding.go:1711–1717  ·  view source on GitHub ↗

DecodeNonsortingStdlibVarint decodes a value encoded by EncodeNonsortingVarint. It returns the length of the encoded varint and value.

(b []byte)

Source from the content-addressed store, hash-verified

1709// DecodeNonsortingStdlibVarint decodes a value encoded by EncodeNonsortingVarint. It
1710// returns the length of the encoded varint and value.
1711func DecodeNonsortingStdlibVarint(b []byte) (remaining []byte, length int, value int64, err error) {
1712 value, length = binary.Varint(b)
1713 if length <= 0 {
1714 return nil, 0, 0, fmt.Errorf("int64 varint decoding failed: %d", length)
1715 }
1716 return b[length:], length, value, nil
1717}
1718
1719// NonsortingUvarintMaxLen is the maximum length of an EncodeNonsortingUvarint
1720// encoded value.

Callers 6

DecodeUntaggedIntValueFunction · 0.85
DecodeUntaggedTimeValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…