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.
Showing
- docs/migration.rst 21 additions, 0 deletionsdocs/migration.rst
- generator/nanopb_generator.py 225 additions, 215 deletionsgenerator/nanopb_generator.py
- pb.h 253 additions, 178 deletionspb.h
- pb_common.c 143 additions, 80 deletionspb_common.c
- pb_common.h 4 additions, 24 deletionspb_common.h
- pb_decode.c 123 additions, 87 deletionspb_decode.c
- pb_decode.h 12 additions, 6 deletionspb_decode.h
- pb_encode.c 13 additions, 28 deletionspb_encode.c
- pb_encode.h 6 additions, 6 deletionspb_encode.h
- tests/alltypes/decode_alltypes.c 4 additions, 6 deletionstests/alltypes/decode_alltypes.c
- tests/backwards_compatibility/alltypes_legacy.c 24 additions, 138 deletionstests/backwards_compatibility/alltypes_legacy.c
- tests/backwards_compatibility/alltypes_legacy.h 125 additions, 47 deletionstests/backwards_compatibility/alltypes_legacy.h
- tests/encode_unittests/encode_unittests.c 4 additions, 2 deletionstests/encode_unittests/encode_unittests.c
- tests/multiple_files/SConscript 2 additions, 1 deletiontests/multiple_files/SConscript
- tests/multiple_files/test_multiple_files.c 13 additions, 6 deletionstests/multiple_files/test_multiple_files.c
- tests/regression/issue_306/large_extension.expected 1 addition, 1 deletiontests/regression/issue_306/large_extension.expected
Loading
Please register or sign in to comment