code: public static DoubleHistogram decodeFromCompressedByteBuffer(
              final ByteBuffer buffer,
              Class<? extends AbstractHistogram> internalCountsHistogramClass,
              long minBarForHighestToLowestValueRatio) throws DataFormatException {
          int cookie = buffer.getInt();
          if (!isCompressedDoubleHistogramCookie(cookie)) {
              throw new IllegalArgumentException("The buffer does not contain a compressed DoubleHistogram");
          }
          DoubleHistogram histogram = constructHistogramFromBuffer(cookie, buffer, internalCountsHistogramClass,
                  minBarForHighestToLowestValueRatio);
          return histogram;
      }
docs: Construct a new DoubleHistogram by decoding it from a compressed form in a ByteBuffer, using a
  specified AbstractHistogram subclass for tracking internal counts (e.g. {@link org.HdrHistogram_voltpatches.Histogram},
  {@link org.HdrHistogram_voltpatches.AtomicHistogram}, {@link org.HdrHistogram_voltpatches.SynchronizedHistogram},
  {@link org.HdrHistogram_voltpatches.IntCountsHistogram}, {@link org.HdrHistogram_voltpatches.ShortCountsHistogram}).
  
  @param buffer The buffer to decode from
  @param internalCountsHistogramClass The class to use for internal counts tracking
  @param minBarForHighestToLowestValueRatio Force highestTrackableValue to be set at least this high
  @return The newly constructed DoubleHistogram
  @throws DataFormatException on error parsing/decompressing the buffer