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

Function computeSmallMetaStringHash

go/fory/meta_string_resolver.go:345–348  ·  view source on GitHub ↗
(words pair, length int, encoding meta.Encoding)

Source from the content-addressed store, hash-verified

343}
344
345func computeSmallMetaStringHash(words pair, length int, encoding meta.Encoding) int64 {
346 hash := uint64(words[0]*31+words[1]) ^ (uint64(length) << 56)
347 return int64((hash & 0xffffffffffffff00) | uint64(encoding))
348}

Callers 3

ReadMetaStringBytesMethod · 0.85
GetMetaStrBytesMethod · 0.85
ComputeMetaStringHashFunction · 0.85

Calls 2

uint64Function · 0.50
int64Function · 0.50

Tested by

no test coverage detected