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

Function readEntry

encoding.go:47–55  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

45}
46
47func readEntry(data []byte) []byte {
48 length := binary.LittleEndian.Uint16(data[timestampSizeInBytes+hashSizeInBytes:])
49
50 // copy on read
51 dst := make([]byte, len(data)-int(headersSizeInBytes+length))
52 copy(dst, data[headersSizeInBytes+length:])
53
54 return dst
55}
56
57func readTimestampFromEntry(data []byte) uint64 {
58 return binary.LittleEndian.Uint64(data)

Callers 8

getWithInfoMethod · 0.85
getMethod · 0.85
setCurrentEntryMethod · 0.85
providedOnRemoveMethod · 0.85
TestEncodeDecodeFunction · 0.85
TestAllocateBiggerBufferFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestEncodeDecodeFunction · 0.68
TestAllocateBiggerBufferFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…