Add extra stuff to a “standard” encoding? Sure, why not

In my experience with using protocol buffers for various projects, I encountered a strange issue when a friend attempted to implement it in another language. We were faced with perplexing errors that seemed to be related to the encoding of the “envelope” component. It turned out that there was an extra byte (1f) in his implementation that wasn’t present in mine. We delved into the rules of protocol buffers, only to find that the extra byte didn’t fit within the defined types. After thorough investigation, we discovered that the chosen protobuf library had an unconventional feature – it added a length byte to the beginning of the message. This quirk caused confusion and bugs for many users, and the solution was to bypass the problematic function. This experience gave me both a new way to communicate in my RPC language and a cautionary tale about flawed libraries.

https://rachelbythebay.com/w/2023/09/19/badlib/

To top