# Selected text, texture and drawing utilities

Review the defined input, price and output before checkout. These are one-time supplied-data jobs, with private JSON result access for 30 days. Existing payment methods remain available. No external accounts, device control, professional certification or recurring commitment is included.

## Unified Diff Exact Text Application

USD 1.00 per job.

Apply a single supplied unified diff at its exact declared positions, requiring exact context and removed lines. Mismatches fail atomically; there is no search, offset or fuzzy matching. Empty patch leaves the text unchanged. One supplied LF-only text document, at most 16000 UTF8 bytes, 256 lines and 2000 characters per line; patches at most 30000 bytes and 64 hunks. BOM, tabs, spaces and terminal-newline state are preserved. NUL/CR, multi-file/Git/binary/combined patches are excluded. Filenames are opaque labels. No filesystem, repository, network access or execution. Use authorized, non-sensitive data. The report describes supplied records and does not change external systems.

[Technical reference](https://www.gnu.org/software/diffutils/manual/html_node/Unified-Format.html). No endorsement is implied.

Example input:

```json
{
  "originalText": "first\nold\n",
  "patchText": "--- old.txt\n+++ new.txt\n@@ -1,2 +1,2 @@\n first\n-old\n+new\n"
}
```

Selected expected fields:

```json
{
  "/resultText": "first\nnew\n",
  "/appliedHunks": 1,
  "/addedLines": 1,
  "/removedLines": 1
}
```

## Deterministic Unified Diff Generation

USD 1.00 per job.

Generate a minimal line-edit unified diff using bounded LCS and deletion-first tie breaking. Line identity includes its terminating LF. Hunk ranges merge when their context windows overlap or touch. At most 65536 line-pair cells; identical text yields an empty patch. Output is replay-verified against the new text, with no promise of byte-for-byte GNU output. One supplied LF-only text document, at most 16000 UTF8 bytes, 256 lines and 2000 characters per line; patches at most 30000 bytes and 64 hunks. BOM, tabs, spaces and terminal-newline state are preserved. NUL/CR, multi-file/Git/binary/combined patches are excluded. Filenames are opaque labels. No filesystem, repository, network access or execution. Use authorized, non-sensitive data. The report describes supplied records and does not change external systems.

[Technical reference](https://www.gnu.org/software/diffutils/manual/html_node/Unified-Format.html). No endorsement is implied.

Example input:

```json
{
  "oldText": "A\nB\n",
  "newText": "A\nC\n",
  "oldLabel": "old.txt",
  "newLabel": "new.txt",
  "contextLines": 1
}
```

Selected expected fields:

```json
{
  "/patchText": "--- old.txt\n+++ new.txt\n@@ -1,2 +1,2 @@\n A\n-B\n+C\n",
  "/hunks": 1,
  "/addedLines": 1,
  "/removedLines": 1
}
```

## DDS Legacy BGRA8 Pixel Codec

USD 1.00 per job.

Encode RGBA pixels as a complete legacy DDS A8R8G8B8 file or decode that exact BGRA-byte profile to RGBA. At most 128 pixels per axis and 1024 total pixels. Tightly packed rows, RGB/alpha flags and fixed channel masks are required; canonical output clears unused fields. Alpha bytes are preserved without assuming premultiplication. DX10, compression, padded rows, other masks, mip chains, arrays, cubemaps and volumes are excluded. Supplied bytes only; no media execution, filesystem, network access or image repair. Use authorized, non-sensitive data. The report describes supplied records and does not change external systems.

[Technical reference](https://learn.microsoft.com/en-us/windows/win32/direct3ddds/dds-pixelformat). No endorsement is implied.

Example input:

```json
{
  "request": {
    "mode": "encode",
    "width": 2,
    "height": 1,
    "rgbaHex": "ff0000ff00ff0080"
  }
}
```

Selected expected fields:

```json
{
  "/storedBgraHex": "0000ffff00ff0080",
  "/rowPitch": 8,
  "/fileBytes": 136
}
```

## KTX2 Container Range Inspector

USD 1.00 per job.

Inspect bounded KTX2 header/index, mip byte ranges, generic descriptor-block envelopes, sorted unique UTF8 keys with opaque values and optional supercompression-global span. UInt64 offsets/lengths are checked with BigInt before containment; uncompressed lengths remain decimal strings. At most 8192 file bytes, 16 indexed levels, 32 descriptor blocks and 64 keys. levelCount0 retains one index entry. Occupied ranges must not overlap, unindexed padding must be zero, and image storage runs smallest mip first. No texel decoding, decompression, transcoding, full Vulkan/DFD/scheme semantics or complete format conformance claim. Supplied bytes only; no file/network access or execution. Use authorized, non-sensitive data. The report describes supplied records and does not change external systems.

[Technical reference](https://registry.khronos.org/KTX/specs/2.0/ktxspec.v2.html). No endorsement is implied.

Example input:

```json
{
  "fileHex": "ab4b5458203230bb0d0a1a0a250000000100000001000000010000000000000000000000010000000100000000000000680000001c0000000000000000000000000000000000000000000000000000008400000000000000040000000000000004000000000000001c000000000000000200180000000000000000000000000000000000ff0000ff"
}
```

Selected expected fields:

```json
{
  "/effectiveLevels": 1,
  "/levels/0/offset": 132,
  "/descriptorBlocks/0/length": 24
}
```

## SPDX Boolean DNF Choices

USD 1.00 per job.

Expand the existing selected SPDX2.3.1 expression grammar into deterministic Boolean AND-sets joined by OR. WITH pairs and trailing + remain indivisible atoms. Ordinary license/exception identifier matching is case-insensitive; custom references preserve exact identity. Exact duplicates are removed, but supersets are intentionally retained. Uppercase operators, one input line, at most 300 tree nodes, 128 tree levels, 64 distinct atoms, 256 choices, 4096 Cartesian pairs and 120000 output-choice bytes. No license-list lookup, compatibility/legal interpretation, external call or license change. Use authorized, non-sensitive data. The report describes supplied records and does not change external systems.

[Technical reference](https://spdx.github.io/spdx-spec/v2.3.1/SPDX-license-expressions/). No endorsement is implied.

Example input:

```json
{
  "expression": "(MIT OR BSD-3-Clause) AND Apache-2.0"
}
```

Selected expected fields:

```json
{
  "/choices": [
    {
      "requiredAtoms": [
        "apache-2.0",
        "bsd-3-clause"
      ]
    },
    {
      "requiredAtoms": [
        "apache-2.0",
        "mit"
      ]
    }
  ],
  "/choiceCount": 2
}
```

## ASCII DXF Planar Geometry Codec

USD 1.00 per job.

Encode or decode supplied ASCII DXF planar geometry in an explicit AC1015 HEADER/ENTITIES-only exchange profile: LINE, CIRCLE and straight LWPOLYLINE on layer 0, XY plane and default extrusion. Preserves decimal coordinate text. At most 64 entities, 512 total point records, 256 vertices per polyline, 1024 group pairs and 32768 text bytes. Unsupported sections, handles, appearance fields, nonzero widths/bulges/elevation and nondefault extrusion are rejected rather than dropped. Complete selected-profile output and exact internal replay are checked; no external CAD import qualification, general DXF conformance, drawing repair, filesystem or network action is claimed. Use authorized, non-sensitive data. The report describes supplied records and does not change external systems.

[Technical reference](https://help.autodesk.com/cloudhelp/2020/ENU/AutoCAD-DXF/files/GUID-FCEF5726-53AE-4C43-B4EA-C84EB8686A66.htm). No endorsement is implied.

Example input:

```json
{
  "request": {
    "mode": "encode",
    "entities": [
      {
        "type": "LINE",
        "start": {
          "x": "0",
          "y": "0"
        },
        "end": {
          "x": "3",
          "y": "4"
        }
      },
      {
        "type": "CIRCLE",
        "center": {
          "x": "5",
          "y": "5"
        },
        "radius": "2"
      },
      {
        "type": "LWPOLYLINE",
        "closed": true,
        "vertices": [
          {
            "x": "0",
            "y": "0"
          },
          {
            "x": "3",
            "y": "0"
          },
          {
            "x": "0",
            "y": "4"
          }
        ]
      }
    ]
  }
}
```

Selected expected fields:

```json
{
  "/entityCount": 3,
  "/vertexCount": 6
}
```

