public byte [ ] toBytesFull ( boolean withHeader ) { int size = getFullStorageSize ( numBuckets ) ; if ( withHeader ) { size += SERDE_HEADER_SIZE ; } ByteBuffer buf = ByteBuffer . allocate ( size ) ; writeByteBufferFull ( buf , withHeader ) ; return buf . array ( ) ; }
Serialize the histogram in full encoding mode .