Open gulachek opened 1 month ago
The only argument I could see is that we have room to extend the header size to use a zig-zag encoding (or whatever it's called with the leading bit continuing a base 128 number). By keeping size_t
, doing that wouldn't require callers to change. But do we really expect a message of size greater than 2^256? That seems way too big to ever support for a messaging protocol.
The header size is bounded by 9 bytes, and in fact, part of the protocol is defined by it being a single byte. Enforce this by typing it as a
uint8_t
.