Description
Construct one varint octet and lowercase hex spelling from a seven-bit payload and continuation flag.
Protocol Buffer integer fields separate a numeric key, signed-value mapping and byte representation. Varint groups carry seven payload bits plus continuation, while ZigZag and sign-extended integer types represent negative values differently.
Construct one varint octet and lowercase hex spelling from a seven-bit payload and continuation flag.
When to use this tool
Use Varint Seven Bit Group Writer when inspecting one supplied protobuf integer or key-encoding component.
How to use the tool and how it works
- Enter payload, moreGroups. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read byte, hex. Use the output convention below.
Require whole payload in [0,127]. byte = payload+(moreGroups ? 128 : 0); hex is its two-digit lowercase hexadecimal spelling.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| payload | Payload | Required. Safe integer; minimum 0; maximum 127. |
| moreGroups | Whether the high continuation bit is set to signal a following group. | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| byte | Byte | Required. Safe integer. |
| hex | Hex | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"payload": 44,
"moreGroups": true
},
"output": {
"byte": 172,
"hex": "ac"
}
} Limitations and assumptions
- moreGroups controls the continuation bit and must reflect the actual surrounding encoding. The tool does not split a larger value into groups or check canonical termination.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use a conforming complete serializer and message schema for full wire encoding, payload validation and interoperability.
References
Similar or alternative tools
- Varint Terminal Byte From Payload
Return octet = payload, leaving the high continuation bit clear to mark the final seven-bit group.
- MessagePack Fixmap Count Header Tool
Construct one MessagePack fixmap header octet; does not serialize its entries.