Fast and dynamic encoding of Protocol Buffers in Go
vincent.bernat.ch
vincent.bernat.ch
The names of the alternatives are links to references.
All technical articles should start this way, well done.
One thing I will quibble about is the representation of the tag number 19, named SrcCountry. The author shows it as binary 10011010 but this is impossible because protobuf tags are themselves encoded as continuation bit variable-length numbers and cannot end in a byte with the most significant bit set. That's why fields 1-15 are the magic fast-path fields taking only 1 byte. Field 19 would need two bytes... 10000001_00011010 or in hex 81 1A
If vtprotobuf would be adopted as an optional compile module in Buf then I would love try it. I just don't think we would want to move away from Buf.
This should be at the TOP not at the end.
Where do you draw the line?