MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / VarintSize

Function VarintSize

internal/utils/utils.go:81–84  ·  view source on GitHub ↗
(x int64)

Source from the content-addressed store, hash-verified

79}
80
81func VarintSize(x int64) int {
82 ux := uint64(x<<1) ^ uint64(x>>63)
83 return UvarintSize(ux)
84}
85
86func GetDiskSizeFromSingleObject(obj any) int64 {
87 typ := reflect.TypeOf(obj)

Callers 1

SizeMethod · 0.92

Calls 1

UvarintSizeFunction · 0.85

Tested by

no test coverage detected