Prefixed length formats that don't make assumptions on encoding are a very good pick. The most important thing is that once you read the length, you can just bulk-read the payload without actually parsing it, that's up to the higher layer (if parsing is needed at all).
A general purpose serialization format that requires per-char processing is a terrible pick.
Comments
Prefixed length formats that don't make assumptions on encoding are a very good pick. The most important thing is that once you read the length, you can just bulk-read the payload without actually parsing it, that's up to the higher layer (if parsing is needed at all).
A general purpose serialization format that requires per-char processing is a terrible pick.
Agreed. I had to implement base64 encoding to pass data through JSON, yeah it works but seems terribly wasteful.