I need to be able to delimit a stream of binary data. I was thinking of using something like the ASCII EOT (End of Transmission) character to do this.
However I’m a bit concerned — how can I know for sure that the particular binary sequence used for this (0b00000100) won’t appear in my own binary sequences, thus giving a false positive on delimitation?
In other words, how is binary delimiting best handled?
EDIT: …Without using a length header. Sorry guys, should have mentioned this before.
You’ve got five options:
\0to include an ASCII NUL in some content.)