mirror of
https://github.com/firebase/nanopb
synced 2026-11-09 22:25:59 +05:45
Now field information is stored as a variable-length uint32_t array.
This reduces the minimum size in most cases:
old new
basic field: 10 bytes 4 bytes
repeated field: 10 bytes 8 bytes
field with 12bit tag/size: 16 bytes 8 bytes
field with 16bit tag/size: 16 bytes 16 bytes
field with 32bit tag/size: 28 bytes 16 bytes
Further, now the descriptor size can be increased per-field and per-message,
instead of previous global PB_FIELD_16BIT and PB_FIELD_32BIT.
PB_FIELD_32BIT still affects the pb_size_t type, which is 16-bit by default.