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

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.social/users/reiver/statuses/115322784992457375 on your instance and quote it. (Note that quoting is not supported in Mastodon.)