MCPcopy
hub / github.com/segmentio/kafka-go / varArrayLen

Function varArrayLen

write.go:585–591  ·  view source on GitHub ↗
(n int, f func(int) int)

Source from the content-addressed store, hash-verified

583}
584
585func varArrayLen(n int, f func(int) int) int {
586 size := varIntLen(int64(n))
587 for i := 0; i < n; i++ {
588 size += f(i)
589 }
590 return size
591}
592
593func messageSize(key, value []byte) int32 {
594 return 4 + // crc

Callers 2

headerSizeMethod · 0.85
recordSizeFunction · 0.85

Calls 1

varIntLenFunction · 0.85

Tested by

no test coverage detected