int findFirstNonZeroIndex(Uint8List bytes) { for (int i = 0; i < bytes.length; i++) { if (bytes[i] != 0) { return i; } } return -1; }