Bytes pack integers

bytes-pack-integers · version 1.0.0 · Other utilities · free, no key needed

Pack exact decimal integer strings into raw hex bytes with explicit widths, endianness, and range checks.

Use when you need to: bitwise integer operations unsigned hex encode endian · pack integers into little endian bytes · write protocol integer fields as hex.

Decide before calling

Read the versioned contract and the supported scope below. Reuse bytes-pack-integers@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use bytes-pack-integers@1.0.0 for bitwise integer operations unsigned hex encode endian. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "values": [
    "305419896"
  ],
  "layout": [
    "u32le"
  ]
}

Response:

{
  "result": {
    "standard_version": "IEEE 754-2019; Python 3.12 struct",
    "byte_length": 4,
    "hex": "78563412"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "bytes-pack-integers",
  "version": "1.0.0",
  "input": {
    "values": [
      "305419896"
    ],
    "layout": [
      "u32le"
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/bytes-pack-integers/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"values":["305419896"],"layout":["u32le"]}'

The machine-readable contract is at /v1/tools/bytes-pack-integers/versions/1.0.0.

CLI

node cli.mjs run bytes-pack-integers 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.