MCPcopy Create free account
hub / github.com/allegro/bigcache / compareKeyFromEntry

Function compareKeyFromEntry

encoding.go:71–75  ·  view source on GitHub ↗
(data []byte, key string)

Source from the content-addressed store, hash-verified

69}
70
71func compareKeyFromEntry(data []byte, key string) bool {
72 length := binary.LittleEndian.Uint16(data[timestampSizeInBytes+hashSizeInBytes:])
73
74 return bytesToString(data[headersSizeInBytes:headersSizeInBytes+length]) == key
75}
76
77func readHashFromEntry(data []byte) uint64 {
78 return binary.LittleEndian.Uint64(data[timestampSizeInBytes:])

Callers 1

getValidWrapEntryMethod · 0.85

Calls 1

bytesToStringFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…