I tried nanopb but rolling our own gives us 2x the speed, allows us to use a dynamic buffer, added less than 100 lines of code, and removes another external dependency.