code: public void toBytesDense(ByteBuffer buf)
    {
      buf.putInt(size);
      buf.putInt(binCount);
  
      buf.asFloatBuffer().put(positions);
      buf.position(buf.position() + Float.BYTES * positions.length);
      buf.asLongBuffer().put(bins);
      buf.position(buf.position() + Long.BYTES * bins.length);
  
      buf.putFloat(min);
      buf.putFloat(max);
    }
docs: Writes the dense representation of this ApproximateHistogram object to the given byte-buffer
  
  Requires 16 + 12 * size bytes of storage
  
  @param buf ByteBuffer to write the ApproximateHistogram to