MCPcopy Index your code
hub / github.com/RoaringBitmap/roaring / headerSize

Method headerSize

roaringarray.go:472–481  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

470}
471
472func (ra *roaringArray) headerSize() uint64 {
473 size := uint64(len(ra.keys))
474 if ra.hasRunCompression() {
475 if size < noOffsetThreshold { // for small bitmaps, we omit the offsets
476 return 4 + (size+7)/8 + 4*size
477 }
478 return 4 + (size+7)/8 + 8*size // - 4 because we pack the size with the cookie
479 }
480 return 4 + 4 + 8*size
481}
482
483// should be dirt cheap
484func (ra *roaringArray) serializedSizeInBytes() uint64 {

Callers 1

serializedSizeInBytesMethod · 0.95

Calls 1

hasRunCompressionMethod · 0.95

Tested by

no test coverage detected