class HpackDecoder {

  static int decodeULE128(final ByteBuf in, final int result) throws Http2Exception {
    final int readerIndex = in.readerIndex();
    final long v = decodeULE128(in, (long) result);
    if (v > Integer.MAX_VALUE) {
      // the maximum value that can be represented by a signed 32 bit number is:
      // [0x1,0x7f] + 0x7f + (0x7f << 7) + (0x7f << 14) + (0x7f << 21) + (0x6 << 28)
      // OR
      // 0x0 + 0x7f + (0x7f << 7) + (0x7f << 14) + (0x7f << 21) + (0x7 << 28)
      // we should reset the readerIndex if we overflowed the int type.
      in.readerIndex(readerIndex);
      throw DECODE_ULE_128_TO_INT_DECOMPRESSION_EXCEPTION;
    }
    return (int) v;
  }

    HpackDecoder(final long maxHeaderListSize, final int initialHuffmanDecodeCapacity);
    HpackDecoder(
      final long maxHeaderListSize,
      final int initialHuffmanDecodeCapacity,
      final int maxHeaderTableSize);

}