{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/programmes-net/json-schema/programmes-net-compress-compress-schema.json",
  "title": "compress.compress",
  "description": "Compress UTF-8 text with gzip, deflate (zlib) or raw deflate.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/programmes-net-encoders-decoders-api-openapi.yml#/components/schemas/compress.compress",
  "type": "object",
  "properties": {
    "operation": {
      "const": "compress"
    },
    "input": {
      "type": "string",
      "description": "The text to compress.",
      "maxLength": 32768
    },
    "options": {
      "type": "object",
      "properties": {
        "algorithm": {
          "type": "string",
          "description": "gzip (RFC 1952), deflate = zlib (RFC 1950) or deflate-raw (RFC 1951).",
          "enum": [
            "gzip",
            "deflate",
            "deflate-raw"
          ],
          "default": "gzip"
        },
        "encoding": {
          "type": "string",
          "description": "How the compressed bytes are written.",
          "enum": [
            "base64",
            "hex"
          ],
          "default": "base64"
        }
      }
    }
  },
  "required": [
    "operation"
  ]
}