Description
Return four octets floor(value/256^i) modulo 256 for i = 0,1,2,3, in least-significant-byte-first order.
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.
Return four octets floor(value/256^i) modulo 256 for i = 0,1,2,3, in least-significant-byte-first order.
When to use this tool
Use Protocol Buffers Fixed32 Octet Fields when inspecting one supplied protobuf integer or key-encoding component.
How to use the tool and how it works
- Enter value. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read bytes. Use the output convention below.
Require whole value in [0,4294967295]. Return four octets floor(value/256^i) modulo 256 for i = 0,1,2,3, in least-significant-byte-first order.1
Protobuf separates keys, varints, fixed-width payloads and signed mappings. A local field transformation does not encode a complete message.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| value | Value | Required. Safe integer; minimum 0; maximum 4294967295. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| bytes | Bytes | Required. Array of safe integer; maximum items 256. |
{
"input": {
"value": 305419896
},
"output": {
"bytes": [
120,
86,
52,
18
]
}
} Limitations and assumptions
- This writes one unsigned fixed32 payload without a field key. It does not encode a signed value, floating-point number or complete protobuf message.
- 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
-
Calculation and input contract: encode/protobuf-fixed32-octet-fields — tool.io
-
Protocol Buffers wire encoding — Protocol Buffers
Similar or alternative tools
- Encoding: Protocol Buffers Wire Key Scalar Fields
Return wireKey = fieldNumber*8+wireType.
- Protocol Buffers Enum Negative Wire Representation
Show a negative int32 value’s sign-extended unsigned64 argument and ten-byte varint length.