private int decodeRunLength(int k){
  if ((k & 1) == 1) {
    return ((k >>> 1) & 63) ^ 63;
  }
 else {
    return Integer.numberOfLeadingZeros(k << p + (31 - sp)) + 1;
  }
}

private int decodeRunLength ( int k ) { if ( ( k & 1 ) == 1 ) { return ( ( k > > > 1 ) & 63 ) ^ 63 ; } else { return Integer . numberOfLeadingZeros ( k << p + ( 31 - sp ) ) + 1 ; } }
more of less the opposite of the encoding function but just for getting out run lengths .
