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

Function decodeInt2

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

Source from the content-addressed store, hash-verified

918}
919
920func decodeInt2(data []byte) (int16, error) {
921 if len(data) < 2 {
922 return 0, fmt.Errorf("insufficient data for int2: got %d bytes, need 2", len(data))
923 }
924 return int16(binary.BigEndian.Uint16(data)), nil
925}
926
927func decodeInt4(data []byte) (int32, error) {
928 if len(data) < 4 {

Callers 3

TestDecodeInt2Function · 0.85
decodeBinaryCopyFunction · 0.85
decodeBinaryFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestDecodeInt2Function · 0.68