Zum Inhalt
HALOWERK

Datenvertragswerk

bounded prefix codebook audit

For2..6 indexed positive symbol weights and max code length1..5, synthesize exact minimum weighted bits, lexicographically first optimal original-index length vector, canonical MSB-first bitwords, exact number of optimal assigned length vectors and Kraft capacity witness. Report infeasibility when the cap cannot fit the alphabet. Compare the entire supplied artifact. Hard cap may change the optimum from unrestricted Huffman; no full DEFLATE/zlib/bit-packing/compression or observed source.

POST https://datenvertrag.halowerk.com/v1/bounded-prefix-codebook-audit

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
weightsarrayJa
max_lengthintegerJa
claimedSiehe SchemaJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "properties": {
    "weights": {
      "type": "array",
      "minItems": 2,
      "maxItems": 6,
      "items": {
        "anyOf": [
          {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "max_length": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5
    },
    "claimed": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "feasible": {
              "type": "boolean"
            },
            "weighted_bits": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 30000
                },
                {
                  "type": "null"
                }
              ]
            },
            "lengths": {
              "anyOf": [
                {
                  "type": "array",
                  "maxItems": 6,
                  "items": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5
                  }
                },
                {
                  "type": "null"
                }
              ]
            },
            "codes": {
              "anyOf": [
                {
                  "type": "array",
                  "maxItems": 6,
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5,
                    "pattern": "^[01]+$"
                  }
                },
                {
                  "type": "null"
                }
              ]
            },
            "optimal_assignment_count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 15625
            },
            "kraft_units": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 32
                },
                {
                  "type": "null"
                }
              ]
            },
            "kraft_capacity": {
              "type": "integer",
              "minimum": 2,
              "maximum": 32
            }
          },
          "required": [
            "feasible",
            "weighted_bits",
            "lengths",
            "codes",
            "optimal_assignment_count",
            "kraft_units",
            "kraft_capacity"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "weights",
    "max_length",
    "claimed"
  ],
  "additionalProperties": false
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "weights": [
    100,
    1,
    1,
    1,
    1,
    1
  ],
  "max_length": 3,
  "claimed": {
    "feasible": true,
    "weighted_bits": 214,
    "lengths": [
      2,
      2,
      3,
      3,
      3,
      3
    ],
    "codes": [
      "00",
      "01",
      "100",
      "101",
      "110",
      "111"
    ],
    "optimal_assignment_count": 5,
    "kraft_units": 8,
    "kraft_capacity": 8
  }
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-07, 02:42 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →