Bytes parse human

bytes-parse-human · version 1.0.0 · Other utilities · free, no key needed

Parse an SI or IEC byte-size string and return an exact integer byte count using explicit rounding.

Use when you need to: parse a human file size · turn 1.5 GiB into bytes · convert 300 MB to exact bytes.

Decide before calling

Read the versioned contract and the supported scope below. Reuse bytes-parse-human@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-parse-human@1.0.0 for parse a human file size. 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:

{
  "text": "1.5GiB",
  "rounding": "half_even"
}

Response:

{
  "result": {
    "bytes": "1610612736",
    "rounding": "half_even",
    "standard_version": "IEC 80000-13:2008; SI Brochure, 9th edition (2019, updated 2022)"
  }
}

How to call it

MCP

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

{
  "id": "bytes-parse-human",
  "version": "1.0.0",
  "input": {
    "text": "1.5GiB",
    "rounding": "half_even"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/bytes-parse-human/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"text":"1.5GiB","rounding":"half_even"}'

The machine-readable contract is at /v1/tools/bytes-parse-human/versions/1.0.0.

CLI

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

Get the client at /clients/cli/.