MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / ParseBinaryInt24

Function ParseBinaryInt24

IceFireDB-SQLProxy/pkg/mysql/mysql/parse_binary.go:24–30  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

22}
23
24func ParseBinaryInt24(data []byte) int32 {
25 u32 := ParseBinaryUint24(data)
26 if u32&0x00800000 != 0 {
27 u32 |= 0xFF000000
28 }
29 return int32(u32)
30}
31
32func ParseBinaryUint24(data []byte) uint32 {
33 return uint32(data[0]) | uint32(data[1])<<8 | uint32(data[2])<<16

Callers 1

Calls 1

ParseBinaryUint24Function · 0.70

Tested by 1