public static int getSparseStorageSize ( int nonEmptyBuckets ) { return COMMON_FIELDS_SIZE + Integer . BYTES + ( Integer . BYTES + Long . BYTES ) * nonEmptyBuckets ; }
Compute the size in bytes of a sparse - encoding serialized histogram without the serialization header