Read whole file or byte(s) at a time
<p>I'm writing a serial interface to send a file to a FPGA project I’ve developed over a serial interface.</p>

<p>The program should send a single packet (of 16 bytes) to the FPGA and then upon a receipt confirmation the program should then send the next packet.</p>

<p>My question is:</p>

<p>When reading the file, is it practice to read the whole file into memory/ a byte array?</p>

<p>Or shall the program only read 16 bytes from the file at a time and read the next 16 bytes when it needs to send the next packet?</p>

<p>Thanks in Advance,
Mike</p>
