public static long[] truncateI(long[] v,int len){
  final int zap=(v.length * Long.SIZE) - len;
  final int zapWords=(zap >>> LONG_LOG2_SIZE);
  final int zapbits=zap & LONG_LOG2_MASK;
  Arrays.fill(v,v.length - zapWords,v.length,0);
  if (zapbits > 0) {
    v[v.length - zapWords - 1]&=(LONG_ALL_BITS >>> zapbits);
  }
  return v;
}

public static long [ ] truncateI ( long [ ] v , int len ) { final int zap = ( v . length * Long . SIZE ) - len ; final int zapWords = ( zap > > > LONG_LOG2_SIZE ) ; final int zapbits = zap & LONG_LOG2_MASK ; Arrays . fill ( v , v . length - zapWords , v . length , 0 ) ; if ( zapbits > 0 ) { v [ v . length - zapWords - 1 ] &= ( LONG_ALL_BITS > > > zapbits ) ; } return v ; }
truncate a bit string to the given length ( setting any higher bit to 0 ) .
