docs: synchronized public int encodeIntoByteBuffer(final ByteBuffer buffer) {
          long maxValue = integerValuesHistogram.getMaxValue();
          int relevantLength = integerValuesHistogram.getLengthForNumberOfBuckets(
                  integerValuesHistogram.getBucketsNeededToCoverValue(maxValue));
          if (buffer.capacity() < getNeededByteBufferCapacity(relevantLength)) {
              throw new ArrayIndexOutOfBoundsException("buffer does not have capacity for " +
                      getNeededByteBufferCapacity(relevantLength) + " bytes");
          }
          buffer.putInt(DHIST_encodingCookie);
          buffer.putInt(getNumberOfSignificantValueDigits());
          buffer.putLong(configuredHighestToLowestValueRatio);
          return integerValuesHistogram.encodeIntoByteBuffer(buffer) + 16;
      }