Adds bytes for raw bytes.
Adds bytes for MQTT binary data (2-byte length prefix + content).
Adds bytes for an MQTT string (2-byte length prefix + UTF-8 content).
Adds bytes for a uint16.
Adds bytes for a uint32.
Adds bytes for a uint8.
Adds bytes for a variable byte integer.
Resets the calculator.
Calculates the total byte length for an MQTT packet.
This is useful for pre-calculating buffer sizes.