List<bool> byteToBits(int byte, int size) { return List.generate(size, (i) => (byte & (1 << i)) != 0); }