Skip to content

Main content

Compression Ratio Header Excluded Base Tool

Calculate compression ratio header excluded base from explicit caller-supplied inputs.

Loading tool…

Description

Subtract header from positive stored size to obtain a positive payload, then divide original by payload for ratio.

A code's symbol cost, length, overhead, and expected rate use different denominators. An ideal information budget is not necessarily the measured size of a practical encoded message.

Subtract header from positive stored size to obtain a positive payload, then divide original by payload for ratio.

When to use this tool

Use Compression Ratio Header Excluded Base when you need one explicit coding-cost or redundancy component.

How to use the tool and how it works

  1. Enter original, stored, header. 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 payload, ratio. Use the output convention below.

Subtract header from positive stored size to obtain a positive payload, then divide original by payload for ratio.1

Input fieldMeaning and unitsAccepted input
originalOriginalRequired. Safe integer; minimum 1.
storedStoredRequired. Safe integer; minimum 1.
headerHeaderRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
payloadPayloadRequired. Safe integer.
ratioRatio using the numerator and denominator conventions stated above.Required. Finite number.
json
{
  "input": {
    "original": 1000,
    "stored": 120,
    "header": 20
  },
  "output": {
    "payload": 100,
    "ratio": 10
  }
}

Limitations and assumptions

  • All sizes must share a unit; this excludes only the stated stored header and does not describe total on-disk compression ratio.
  • 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

Inspect the complete codebook and format, including headers, termination, padding, and source probabilities.

References

  1. Calculation and input contract: information/compression-ratio-header-excluded-base — tool.io

Similar or alternative tools