Hacker News new | ask | show | jobs
by __s 13 days ago
I've often done same thing with encoding msgpack maps while streaming in key/value pairs
1 comments

Neat! It's a useful technique whenever you don't know or want to defer knowing the size of an integer until a later time, but need to allocate space for it up front.

I'm wary of introducing these forced-canonical encodings by someone hyper focused on "efficiency" and "security" without reconsidering additional use cases.