I've been building tools to generate generic protobuf data from json (yes, I'm aware I lose context, this is for testing)
I've found a message I can parse properly, but protoc --decode_raw can't:
\n \a 3 4 5 0 0 0 0
protoc
to reproduce it:
echo -n $'\x0a' > binary.dat; echo -n $'\x07' >> binary.dat; echo -n $'3450000' >> binary.dat ; protoc --decode_raw < binary.dat
I'm able to parse this properly using protowire as:
1: "3450000"
also if I change the first character in the bytes to a '1' I get a valid output:
$ echo -n $'\x0a' > binary.dat; echo -n $'\x07' >> binary.dat; echo -n $'1450000' >> binary.dat ; protoc --decode_raw < binary.dat
1: "1450000"
$ protoc --version
libprotoc 3.15.8
I've worked really hard to keep the reproduction as simple as possible, I haven't dug into the code for decode_raw yet, that's my next step..
thanks
-Barry