(x: number, y: number)
| 228 | let steps = 0; |
| 229 | // Matching lines in a row from (x, y), capped at MIN_RESYNC_RUN. |
| 230 | const runLength = (x: number, y: number) => { |
| 231 | let run = 0; |
| 232 | while ( |
| 233 | run < MIN_RESYNC_RUN && |
| 234 | x + run < aHi && |
| 235 | y + run < bHi && |
| 236 | a[x + run] === b[y + run] |
| 237 | ) { |
| 238 | run += 1; |
| 239 | } |
| 240 | steps += run + 1; |
| 241 | return run; |
| 242 | }; |
| 243 | |
| 244 | let matched = 0; |
| 245 | let x = aStart; |