Use bytearray in iff.py for better performance