Decodes an MQTT remaining-length varint starting at offset.
Reads up to four continuation-flagged bytes and reconstructs the base-128 value, returning both
the value and how many bytes it consumed so the caller can advance its cursor. Rejects a varint
longer than four bytes, which would exceed MAX_REMAINING_LENGTH.
Decodes an MQTT remaining-length varint starting at
offset.Reads up to four continuation-flagged bytes and reconstructs the base-128 value, returning both the value and how many bytes it consumed so the caller can advance its cursor. Rejects a varint longer than four bytes, which would exceed MAX_REMAINING_LENGTH.