public static long[] shiftRightI(long[] v,int off){
  if (off == 0) {
    return v;
  }
  if (off < 0) {
    return shiftLeftI(v,-off);
  }
  final int shiftWords=off >>> LONG_LOG2_SIZE;
  final int shiftBits=off & LONG_LOG2_MASK;
  if (shiftWords >= v.length) {
    return zeroI(v);
  }
  if (shiftBits == 0) {
    System.arraycopy(v,shiftWords,v,0,v.length - shiftWords);
    Arrays.fill(v,v.length - shiftWords,v.length,0);
    return v;
  }
  final int unshiftBits=Long.SIZE - shiftBits;
  for (int i=0; i < v.length - shiftWords - 1; i++) {
    final int src=i + shiftWords;
    v[i]=(v[src + 1] << unshiftBits) | (v[src] >>> shiftBits);
  }
  v[v.length - shiftWords - 1]=v[v.length - 1] >>> shiftBits;
  Arrays.fill(v,v.length - shiftWords,v.length,0);
  return v;
}

public static long [ ] shiftRightI ( long [ ] v , int off ) { if ( off == 0 ) { return v ; } if ( off < 0 ) { return shiftLeftI ( v , - off ) ; } final int shiftWords = off > > > LONG_LOG2_SIZE ; final int shiftBits = off & LONG_LOG2_MASK ; if ( shiftWords >= v . length ) { return zeroI ( v ) ; } if ( shiftBits == 0 ) { System . arraycopy ( v , shiftWords , v , 0 , v . length - shiftWords ) ; Arrays . fill ( v , v . length - shiftWords , v . length , 0 ) ; return v ; } final int unshiftBits = Long . SIZE - shiftBits ; for ( int i = 0 ; i < v . length - shiftWords - 1 ; i ++ ) { final int src = i + shiftWords ; v [ i ] = ( v [ src + 1 ] << unshiftBits ) | ( v [ src ] > > > shiftBits ) ; } v [ v . length - shiftWords - 1 ] = v [ v . length - 1 ] > > > shiftBits ; Arrays . fill ( v , v . length - shiftWords , v . length , 0 ) ; return v ; }
shift a long [ ] bitset inplace . low - endian layout for the array .
