by vintermann · 8mo ago · 0 comments
You can avoid it by using a bijective arithmetic encoder, which by definition never encounters an "unexpected end of stream error", and any bit string decodes to a different message. That's the cool way.
The boring practical way is to just encrypt your bits.