static long byteArraysTotalDiff(byte[] a, byte[] b) { long diff = 0; int n = l(a); assertEquals("array length", n, l(b)); for i to n: diff += abs(((int) a[i])-b[i]); ret diff; }