code: func VarintSize(num int) int {
  	bits := bits.Len(uint(num))
  	q, r := bits/7, bits%7
  	size := q
  	if r > 0 || size == 0 {
  		size++
  	}
  	return size
  }
docs: // VarintSize returns the size (in bytes) of `num` encoded as a varint.