Skip to content

Main content

Ascii85 Zero Shorthand Eligibility Tool

Compute ascii85 zero shorthand eligibility from explicit bounded inputs.

Loading tool…

Description

eligible is true only for exactly four zeros; return token z then, otherwise an empty string.

Ascii85 groups four source bytes into a fixed encoded group and treats final partial groups differently. Its zero shorthand is a special full-group representation, not a substitute for arbitrary short zero sequences.

eligible is true only for exactly four zeros; return token z then, otherwise an empty string.

When to use this tool

Use Ascii85 Zero Shorthand Eligibility when checking a partial-group count or zero-shorthand eligibility.

How to use the tool and how it works

  1. Enter bytes, finalGroup. 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 eligible, token. Inspect eligible before interpreting the associated values.

Require one to four byte values in [0,255]; fewer than four require finalGroup true. eligible is true only for exactly four zeros; return token z then, otherwise an empty string.1

Input fieldMeaning and unitsAccepted input
bytesBytesRequired. Array of safe integer; maximum items 256.
finalGroupFinal GroupRequired. Boolean.
Output fieldInterpretationReturned shape
eligibleEligibleRequired. Boolean.
tokenz when shorthand is eligible, otherwise an empty sentinel that is not an encoded group.Required. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "bytes": [
      0,
      0,
      0,
      0
    ],
    "finalGroup": false
  },
  "output": {
    "eligible": true,
    "token": "z"
  }
}

Limitations and assumptions

  • The empty token means no shorthand was selected, not an encoding of the supplied group. Partial zero groups cannot use z; full Ascii85 encoding remains separate.
  • 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.

Alternative or Complementary methods

Use the full Ascii85 variant required by the consumer for group encoding, delimiters and wrapping.

References

  1. Calculation and input contract: encode/ascii85-zero-shorthand-eligibility — tool.io

Similar or alternative tools