Welcome to the Forum.
This is the model used by ALFAT:
When sending or receiving [em]data[/em] to or from a file, the data stream is packaged into known sized packets; consequently, no interpretation of that data is made. It can be ASCII it can be binary.
Other than the [em]data[/em] stream described above, all bytes transferred are printable ASCII and end-of-line characters.
As a simplified example:
[ol]after a file on your flash is opened (all dialogue in ASCII), to read 8 bytes of data (binary or ascii), you would send a read command that specified that you wanted 8 bytes.
ALFAT would acknowledge the request for data
then ALFAT would send back exactly 8 bytes.
If there were only 4 bytes left to read from the file, ALFAT would still send back 8
Since ALFAT follows each packet of data by the number of significant bytes in the packet, the host program would know to discard the 4 non-significant bytes.
Are you working with an ALFAT or investigating usage? If you have an ALFAT which product?