You can tell if the whole file was downloaded using the HTTP-protocol by using the Content-Length header.
I think the creators of the nex-protocol, gemini-protocol, and other similar protocols felt something like that was too complex.
I wonder if using the ␄ control character to mark the end of the file was considered.
End of Transmission (␄) = 0x04
And used ␛ control character to escape when ␄ (or ␛) appeared in the data.
Escape (␛) = 0x1B
