lib/rsync/rsync-utils.js
function createHashtable(checksums) {
  var hashtable = {};
  var len = checksums.length;
  var checksum;
  var weak16;

  for (var i = 0; i < len; i++) {
    checksum = checksums[i];
    weak16 = calcWeak16(checksum.weak);
    if (hashtable[weak16]) {
      hashtable[weak16].push(checksum);
    } else {
      hashtable[weak16] = [checksum];
    }
  }
  return hashtable;
}
function createHashtable(checksums) {
  var hashtable = {};
  var len = checksums.length;
  var checksum;
  var weak16;

  for (var i = 0; i < len; i++) {
    checksum = checksums[i];
    weak16 = calcWeak16(checksum.weak);
    if (hashtable[weak16]) {
      hashtable[weak16].push(checksum);
    } else {
      hashtable[weak16] = [checksum];
    }
  }
  return hashtable;
}
function createHashtable ( checksums ) { var hashtable = { } ; var len = checksums . length ; var checksum ; var weak16 ; for ( var i = 0 ; i < len ; i ++ ) { checksum = checksums [ i ] ; weak16 = calcWeak16 ( checksum . weak ) ; if ( hashtable [ weak16 ] ) { hashtable [ weak16 ] . push ( checksum ) ; } else { hashtable [ weak16 ] = [ checksum ] ; } } return hashtable ; }
RSync algorithm to create a hashtable from checksums
RSync algorithm to create a hashtable from checksums