MCPcopy Create free account
hub / github.com/PostHog/duckgres / decodeInt4

Function decodeInt4

server/types.go:927–932  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

925}
926
927func decodeInt4(data []byte) (int32, error) {
928 if len(data) < 4 {
929 return 0, fmt.Errorf("insufficient data for int4: got %d bytes, need 4", len(data))
930 }
931 return int32(binary.BigEndian.Uint32(data)), nil
932}
933
934func decodeInt8(data []byte) (int64, error) {
935 if len(data) < 8 {

Callers 3

TestDecodeInt4Function · 0.85
decodeBinaryCopyFunction · 0.85
decodeBinaryFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestDecodeInt4Function · 0.68