public static void copy(long[] src,int srcOffset,long[] dst,int dstOffset,int len){
  int srcLimit=srcOffset + len;
  while (srcOffset < srcLimit) {
    int srcIdx=srcOffset & 63;
    int dstIdx=dstOffset & 63;
    int srcRemainder=64 - srcIdx;
    int dstRemainder=64 - dstIdx;
    int chunkLen=Math.min(srcRemainder,dstRemainder);
    long mask=maskBelow(chunkLen) << srcIdx;
    dst[dstOffset >> 6]|=((src[srcOffset >> 6] & mask) >>> srcIdx) << dstOffset;
    srcOffset+=chunkLen;
    dstOffset+=chunkLen;
  }
}

public static void copy ( long [ ] src , int srcOffset , long [ ] dst , int dstOffset , int len ) { int srcLimit = srcOffset + len ; while ( srcOffset < srcLimit ) { int srcIdx = srcOffset & 63 ; int dstIdx = dstOffset & 63 ; int srcRemainder = 64 - srcIdx ; int dstRemainder = 64 - dstIdx ; int chunkLen = Math . min ( srcRemainder , dstRemainder ) ; long mask = maskBelow ( chunkLen ) << srcIdx ; dst [ dstOffset > > 6 ] |= ( ( src [ srcOffset > > 6 ] & mask ) > > > srcIdx ) << dstOffset ; srcOffset += chunkLen ; dstOffset += chunkLen ; } }
copies a bit range from one vector to another .
