equalSnapshots = (snap1, snap2) => {
  const ds1 = snap1.ds.clients;
  const ds2 = snap2.ds.clients;
  const sv1 = snap1.sv;
  const sv2 = snap2.sv;

  if (sv1.size !== sv2.size || ds1.size !== ds2.size) {
    return false;
  }

  for (const [key, value] of sv1.entries()) {
    if (sv2.get(key) !== value) {
      return false;
    }
  }

  for (const [client, dsitems1] of ds1.entries()) {
    const dsitems2 = ds2.get(client) || [];

    if (dsitems1.length !== dsitems2.length) {
      return false;
    }

    for (let i = 0; i < dsitems1.length; i++) {
      const dsitem1 = dsitems1[i];
      const dsitem2 = dsitems2[i];

      if (dsitem1.clock !== dsitem2.clock || dsitem1.len !== dsitem2.len) {
        return false;
      }
    }
  }

  return true;
}
@param {Snapshot} snap1
@param {Snapshot} snap2
@return {boolean}