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

Function EncodeNonsortingStdlibVarint

pkg/util/encoding/encoding.go:1702–1707  ·  view source on GitHub ↗

EncodeNonsortingStdlibVarint encodes an int value using encoding/binary, appends it to the supplied buffer, and returns the final buffer.

(appendTo []byte, x int64)

Source from the content-addressed store, hash-verified

1700// EncodeNonsortingStdlibVarint encodes an int value using encoding/binary, appends it
1701// to the supplied buffer, and returns the final buffer.
1702func EncodeNonsortingStdlibVarint(appendTo []byte, x int64) []byte {
1703 // Fixed size array to allocate this on the stack.
1704 var scratch [binary.MaxVarintLen64]byte
1705 i := binary.PutVarint(scratch[:binary.MaxVarintLen64], x)
1706 return append(appendTo, scratch[:i]...)
1707}
1708
1709// DecodeNonsortingStdlibVarint decodes a value encoded by EncodeNonsortingVarint. It
1710// returns the length of the encoded varint and value.

Callers 4

EncodeUntaggedIntValueFunction · 0.85
EncodeUntaggedTimeValueFunction · 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…