Content Encoding Detector

Parse actual DECLAREDC ontent-Encoding coding list in applied order, knowncodinginventorygzip/compress/deflate/br/zstd/identity. Does not detect bytes, sniff encoding, decompress or accept header as proof content. Empty header means none, no request.

Description

Content-Encoding declares transformations applied to an HTTP representation, such as compression.

Content-Encoding declares transformations applied to an HTTP representation, such as compression.1

The coding list describes declared processing order; inspecting that header does not inspect or decompress the body. The calculation and input requirements are explained below.

When to use Content Encoding Detector

Paste the Content-Encoding field value.

How to use Content Encoding Detector and how it works

  1. Prepare the measurements or independently established model inputs described below, with matching units and observation scope.
  2. Enter the required fields and run Content Encoding Detector.
  3. Read the result fields using the formula, output units, signs and ordering explained below.
  4. Correct any rejected inputs and rerun; interpret the result within the stated model and its assumptions.
Input fieldMeaningValue typeRequirement
actualContentEncodingHeaderActual Content Encoding Header. Use the units and matching context stated in the calculation below.stringRequired; other constraints below

Paste the Content-Encoding field value. A blank value returns empty lists. Otherwise split on commas, trim and lowercase each token, and reject empty members, parameters, whitespace within tokens and invalid HTTP-token characters. Preserve order and duplicates; return the entire declared list and the subset outside gzip, compress, deflate, br, zstd and identity. No byte detection or decompression occurs.

declared=normalizedCommaSeparatedTokens; unknown=declared.filter(notInInventory)

Apply the input ordering, units and branch conditions stated above.

Output fieldMeaningValue type
resultObject containing the calculated or selected fields below.object
result.declaredContentCodingsDeclared Content Codings. Interpret its unit, sign, order or availability flag as explained above.array of string
result.unknownDeclaredCodingsUnknown Declared Codings. Interpret its unit, sign, order or availability flag as explained above.array
json
{
  "input": {
    "actualContentEncodingHeader": "gzip, br"
  },
  "output": {
    "result": {
      "declaredContentCodings": [
        "gzip",
        "br"
      ],
      "unknownDeclaredCodings": []
    }
  }
}

Limitations and assumptions

The calculation uses the supplied observations and model inputs. It does not collect measurements, select a reference population or coefficient, or establish that the model applies to the actual case. The stated branch conditions and output units remain part of the result.

All fields require explicit values. Unexpected fields, wrong types, nonfinite numbers and sparse arrays are rejected. Alignment, bounds and supported-token rules are explained above; extremely large inputs or nonfinite results can also fail. Input errors differ from successful false comparisons, unavailable-domain flags and empty match lists.

Alternative or Complementary methods

Use Referrer Extractor for a complementary operation: The HTTP Referer request field records a referring URL when a client sends one.

Use Referrer Attribute Parser for a complementary operation: A referrerpolicy attribute names a policy for controlling referrer information.

References

  1. Content Encoding Detector — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies