code: static EncodableHistogram decodeFromCompressedByteBuffer(
              ByteBuffer buffer,
              final long minBarForHighestTrackableValue) throws DataFormatException {
          // Peek iun buffer to see the cookie:
          int cookie = buffer.getInt(buffer.position());
          if (DoubleHistogram.isDoubleHistogramCookie(cookie)) {
              return DoubleHistogram.decodeFromCompressedByteBuffer(buffer, minBarForHighestTrackableValue);
          } else {
              return Histogram.decodeFromCompressedByteBuffer(buffer, minBarForHighestTrackableValue);
          }
      }
docs: Decode a {@EncodableHistogram} from a compressed byte buffer. Will return either a
  {@link org.HdrHistogram_voltpatches.Histogram} or {@link org.HdrHistogram_voltpatches.DoubleHistogram} depending
  on the format found in the supplied buffer.
  
  @param buffer The input buffer to decode from.
  @param minBarForHighestTrackableValue A lower bound either on the highestTrackableValue of
  the created Histogram, or on the HighestToLowestValueRatio
  of the created DoubleHistogram.
  @return The decoded {@link org.HdrHistogram_voltpatches.Histogram} or {@link org.HdrHistogram_voltpatches.DoubleHistogram}
  @throws DataFormatException on errors in decoding the buffer compression.