public static int decodeValue ( final short encodedSize ) { final int value = encodedSize & 0xFFFF ; if ( value > MAX_ENC_VALUE ) { throw new SketchesArgumentException ( "Maximum valid encoded value is " + Integer . toHexString ( MAX_ENC_VALUE ) + ", found: " + value ) ; } final int p = ( value >>> EXPONENT_SHIFT ) & EXPONENT_MASK ; final int i = value & INDEX_MASK ; return ( int ) ( ( 1 << p ) * ( ( i * INV_BINS_PER_OCTAVE ) + 1.0 ) ) ; }
Decodes the 16 - bit reservoir size value into an int .