Decoding a protobuff without a circuit

Is it possible to decode serialized protobuf files without a circuit using tools or anything that could decode binary data into a human-readable format?

+6
source share
1 answer

You can often output the circuit. In fact, the IIRC protoc tool has a set of parameters ( --decode_raw , iirc) where it will do just that - making reasonable assumptions. However, this assumption - the format is ambiguous in that several different types of data can be stored in the same mechanisms - for example, the length with a prefix can be:

  • sub-object (any type of user)
  • packed array (various primitive types)
  • utf-8 string
  • source byte []
  • and maybe something else I forget

Similarly, a 4-byte fixed-width block can be a fixed-width integer or a float; an integer can be signed or unsigned.

+5
source

Source: https://habr.com/ru/post/975446/


All Articles