Skip to content
Snippets Groups Projects
Commit 66be6b7c authored by Petteri Aimonen's avatar Petteri Aimonen
Browse files

New field descriptor format.

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.
parent 1ae529ee
No related branches found
No related tags found
Loading
Showing with 973 additions and 825 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment