Skip to content

Main content

MessagePack Fixmap Count Header Tool

Construct one MessagePack fixmap header octet; does not serialize its entries.

Loading tool…

Description

Return header = 128+entries for one fixmap key-value-pair count.

MessagePack uses compact tag families for small integers, short strings and small containers. A header can carry a count directly, but that count must agree with the following encoded items or UTF-8 bytes.

Return header = 128+entries for one fixmap key-value-pair count.

When to use this tool

Use MessagePack Fixmap Count Header when constructing one compact MessagePack header or scalar byte.

How to use the tool and how it works

  1. Enter entries. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read header. Use the output convention below.

Require whole entries in [0,15]. Return header = 128+entries for one fixmap key-value-pair count.1

Input fieldMeaning and unitsAccepted input
entriesEntriesRequired. Safe integer; minimum 0; maximum 15.
Output fieldInterpretationReturned shape
headerHeaderRequired. Safe integer.
json
{
  "input": {
    "entries": 2
  },
  "output": {
    "header": 130
  }
}

Limitations and assumptions

  • entries counts pairs rather than total keys plus values. This emits only the header, not map contents or key validation.
  • 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 complete MessagePack serializer for payload encoding, nested structure and interoperable validation.

References

  1. Calculation and input contract: encode/msgpack-fixmap-count-header — tool.io

Similar or alternative tools