static bool[] boolArrayFromBytes(byte[] a, int n) { bool[] b = new bool[n]; int m = min(n, l(a)*8); for (int i = 0; i < m; i++) b[i] = (a[i/8] & 1 << (i & 7)) != 0; ret b; }