use writeInt8 when reading from an array