# Supported VCDIFF format

MoonVCDIFF 0.1.0 implements the core encoding described by RFC 3284.

## Supported

| Area | Support |
| --- | --- |
| File header | Standard magic and version 0 |
| Windows | Independent, VCD_SOURCE, VCD_TARGET, multiple windows |
| Instructions | ADD, RUN, COPY, and two-instruction default opcodes |
| Code table | RFC default 256-entry table |
| Addressing | SELF, HERE, NEAR modes 2–5, SAME modes 6–8 |
| Integer encoding | Canonical big-endian base-128 unsigned integers |
| COPY semantics | Source dictionary, prior target, and overlapping target COPY |
| Delta indicator | Standard uncompressed data/instruction/address sections |

The parser validates exact section consumption and reconstructed target length.
The encoder writes version 0, no application header, no checksum extension,
and no secondary compression. Its output is deterministic for equal source,
target, and options.

## Explicitly unsupported in 0.1.0

- Secondary compressors (`VCD_DECOMPRESS` and compressed delta sections).
- Custom code tables (`VCD_CODETABLE`).
- Application headers (`VCD_APPHEADER`).
- Google interleaved-window and Adler-32 extensions.

Unsupported header features return `UnsupportedFeature` at the flag byte. An
unknown version returns `UnsupportedVersion`; neither is interpreted as core
VCDIFF.

## Canonical input policy

MoonVCDIFF rejects overlong variable-length integers, integers outside the
portable signed range, conflicting source flags, impossible dictionary ranges,
truncated sections, unused section bytes, out-of-range COPY addresses, and
target lengths inconsistent with the instruction stream.

