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

Function BFixedLengthInt

IceFireDB-SQLProxy/pkg/mysql/mysql/util.go:135–141  ·  view source on GitHub ↗

BFixedLengthInt: big endian

(buf []byte)

Source from the content-addressed store, hash-verified

133
134// BFixedLengthInt: big endian
135func BFixedLengthInt(buf []byte) uint64 {
136 var num uint64 = 0
137 for i, b := range buf {
138 num |= uint64(b) << (uint(len(buf)-i-1) * 8)
139 }
140 return num
141}
142
143func LengthEncodedInt(b []byte) (num uint64, isNull bool, n int) {
144 if len(b) == 0 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected