MCPcopy Create free account
hub / github.com/apache/fory / encodeDecimalZigZag64

Function encodeDecimalZigZag64

go/fory/decimal.go:176–178  ·  view source on GitHub ↗
(value int64)

Source from the content-addressed store, hash-verified

174}
175
176func encodeDecimalZigZag64(value int64) uint64 {
177 return uint64((value << 1) ^ (value >> 63))
178}
179
180func decodeDecimalZigZag64(value uint64) int64 {
181 return int64((value >> 1) ^ uint64(-(int64(value & 1))))

Callers 2

writeDecimalPartsFunction · 0.85

Calls 1

uint64Function · 0.50

Tested by

no test coverage detected