mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
52897fd067
Add encode_varint_raw_short() and ProtoSize::varint_short() that inline both the 1-byte and 2-byte varint paths, falling back to the noinline slow path for 3+ bytes. Use these for sint32 fields (zigzag encoding), where values like RSSI (-100 to 0) produce zigzag values that are 1-2 bytes. This avoids a function call for the common case without bloating the generic encode_varint_raw fast path.