-
The Problem Statement indicates that the input files contain "valid ASCII input sequence[s]". For the purposes of this solution, I interpret that statement as meaning that the input files are already ASCII encoded. This makes the
encode()
operation as simple as moving bytes, verbatim, from the input file to the output array. -
The entire contents of the message (and any subsequent messages) must be read to memory to be stored to an array. Therefore, I assume that memory is not of concern (in this solution) and that there is at least as much available memory as the total size of all message files plus the size of the largest message file.