# fcorbelli/zpaqfranz architecture

> Architecture diagram of the GitHub repository fcorbelli/zpaqfranz, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fcorbelli/zpaqfranz
- Repository: https://github.com/fcorbelli/zpaqfranz

## Overview

zpaqfranz is a command-line backup, disaster-recovery, and multiversioned archiver. The main workflow is to add files or disk data to a versioned archive, inspect or validate it, then restore or browse a chosen version. Other documented capabilities include archive repacking, cloud append, database and Proxmox backups, and Windows self-extracting archives. The main command implementation was not sampled, so its domain components share the supported `zpaqfranz.cpp` path; relationships among them are shown only where the README documents them. SFX utility relationships are supported by the excerpts.

Main entry points: [`zpaqfranz.cpp`](https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp) (CLI commands), [`ZSFX/libzpaq.cpp`](https://github.com/fcorbelli/zpaqfranz/blob/main/ZSFX/libzpaq.cpp) (ZPAQ codec), [`ZSFX/zsfx.cpp`](https://github.com/fcorbelli/zpaqfranz/blob/main/ZSFX/zsfx.cpp) (SFX runtime), [`ZSFX/sfxtool.cpp`](https://github.com/fcorbelli/zpaqfranz/blob/main/ZSFX/sfxtool.cpp) (SFX module tool)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_archive["Archive lifecycle"]
  node_cli["CLI commands<br/>[zpaqfranz.cpp]"]
  node_versioned["Versioned backups<br/>[zpaqfranz.cpp]"]
  node_archive_store[("ZPAQ archive")]
  node_inspect["List versions<br/>[zpaqfranz.cpp]"]
  node_validate["Integrity checks<br/>[zpaqfranz.cpp]"]
  node_repack["Version repacking<br/>[zpaqfranz.cpp]"]
end

subgraph group_recovery["Recovery and images"]
  node_restore["Restore files<br/>[zpaqfranz.cpp]"]
  node_mount["Read-only mount<br/>[zpaqfranz.cpp]"]
  node_disk_image["Disk imaging<br/>[zpaqfranz.cpp]"]
  node_repair["Archive recovery<br/>[zpaqfranz.cpp]"]
end

subgraph group_integrations["Backup integrations"]
  node_cloud["Cloud append<br/>[zpaqfranz.cpp]"]
  node_database_backup["MySQL backup<br/>[zpaqfranz.cpp]"]
  node_proxmox_backup["Proxmox backup<br/>[zpaqfranz.cpp]"]
end

subgraph group_sfx["SFX components"]
  node_zsfx_runtime["SFX runtime<br/>[zsfx.cpp]"]
  node_libzpaq["ZPAQ codec<br/>[libzpaq.cpp]"]
  node_sfxtool["SFX module tool<br/>[sfxtool.cpp]"]
  node_zpipe["SFX compressor<br/>[zpipe.cpp]"]
  node_zpipe_codec["Streaming codec<br/>[libzpaq.cpp]"]
end

node_operator(("Operator"))

node_operator -->|"runs"| node_cli
node_cli -->|"adds changes"| node_versioned
node_versioned -->|"writes versions"| node_archive_store
node_cli -->|"lists versions"| node_inspect
node_cli -->|"checks backup"| node_validate
node_cli -->|"extracts version"| node_restore
node_cli -->|"mounts archive"| node_mount
node_cli -->|"images drive"| node_disk_image
node_cli -->|"repackages versions"| node_repack
node_cli -->|"recovers archive"| node_repair
node_cli -->|"appends upload"| node_cloud
node_cli -->|"runs backup"| node_database_backup
node_cli -->|"backs up guests"| node_proxmox_backup
node_zsfx_runtime -->|"uses codec"| node_libzpaq
node_sfxtool -->|"decompresses modules"| node_libzpaq
node_zpipe -->|"calls codec"| node_zpipe_codec

click node_cli "https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp"
click node_versioned "https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp"
click node_inspect "https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp"
click node_validate "https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp"
click node_repack "https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp"
click node_restore "https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp"
click node_mount "https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp"
click node_disk_image "https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp"
click node_repair "https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp"
click node_cloud "https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp"
click node_database_backup "https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp"
click node_proxmox_backup "https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp"
click node_zsfx_runtime "https://github.com/fcorbelli/zpaqfranz/blob/main/ZSFX/zsfx.cpp"
click node_libzpaq "https://github.com/fcorbelli/zpaqfranz/blob/main/ZSFX/libzpaq.cpp"
click node_sfxtool "https://github.com/fcorbelli/zpaqfranz/blob/main/ZSFX/sfxtool.cpp"
click node_zpipe "https://github.com/fcorbelli/zpaqfranz/blob/main/ZSFX/zpipe/zpipe.cpp"
click node_zpipe_codec "https://github.com/fcorbelli/zpaqfranz/blob/main/ZSFX/zpipe/libzpaq.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_versioned,node_archive_store,node_inspect,node_validate,node_repack toneBlue
class node_restore,node_mount,node_disk_image,node_repair toneAmber
class node_cloud,node_database_backup,node_proxmox_backup toneMint
class node_zsfx_runtime,node_libzpaq,node_sfxtool,node_zpipe,node_zpipe_codec toneRose
class node_operator toneIndigo
```

## Components

### Archive lifecycle

- [CLI commands](https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp): `zpaqfranz.cpp`
- [Versioned backups](https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp): `zpaqfranz.cpp`
- **ZPAQ archive**
- [List versions](https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp): `zpaqfranz.cpp`
- [Integrity checks](https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp): `zpaqfranz.cpp`
- [Version repacking](https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp): `zpaqfranz.cpp`

### Recovery and images

- [Restore files](https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp): `zpaqfranz.cpp`
- [Read-only mount](https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp): `zpaqfranz.cpp`
- [Disk imaging](https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp): `zpaqfranz.cpp`
- [Archive recovery](https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp): `zpaqfranz.cpp`

### Backup integrations

- [Cloud append](https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp): `zpaqfranz.cpp`
- [MySQL backup](https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp): `zpaqfranz.cpp`
- [Proxmox backup](https://github.com/fcorbelli/zpaqfranz/blob/main/zpaqfranz.cpp): `zpaqfranz.cpp`

### SFX components

- [SFX runtime](https://github.com/fcorbelli/zpaqfranz/blob/main/ZSFX/zsfx.cpp): `ZSFX/zsfx.cpp`
- [ZPAQ codec](https://github.com/fcorbelli/zpaqfranz/blob/main/ZSFX/libzpaq.cpp): `ZSFX/libzpaq.cpp`
- [SFX module tool](https://github.com/fcorbelli/zpaqfranz/blob/main/ZSFX/sfxtool.cpp): `ZSFX/sfxtool.cpp`
- [SFX compressor](https://github.com/fcorbelli/zpaqfranz/blob/main/ZSFX/zpipe/zpipe.cpp): `ZSFX/zpipe/zpipe.cpp`
- [Streaming codec](https://github.com/fcorbelli/zpaqfranz/blob/main/ZSFX/zpipe/libzpaq.cpp): `ZSFX/zpipe/libzpaq.cpp`

### Other components

- **Operator**

## Connections

- Operator → CLI commands: runs (evidence: `README.md`)
- CLI commands → Versioned backups: adds changes (evidence: `README.md`)
- Versioned backups → ZPAQ archive: writes versions (evidence: `README.md`)
- CLI commands → List versions: lists versions (evidence: `README.md`)
- CLI commands → Integrity checks: checks backup (evidence: `README.md`)
- CLI commands → Restore files: extracts version (evidence: `README.md`)
- CLI commands → Read-only mount: mounts archive (evidence: `README.md`)
- CLI commands → Disk imaging: images drive (evidence: `README.md`)
- CLI commands → Version repacking: repackages versions (evidence: `README.md`)
- CLI commands → Archive recovery: recovers archive (evidence: `README.md`)
- CLI commands → Cloud append: appends upload (evidence: `README.md`)
- CLI commands → MySQL backup: runs backup (evidence: `README.md`)
- CLI commands → Proxmox backup: backs up guests (evidence: `README.md`)
- SFX runtime → ZPAQ codec: uses codec (evidence: `ZSFX/zsfx.cpp`)
- SFX module tool → ZPAQ codec: decompresses modules (evidence: `ZSFX/sfxtool.cpp`)
- SFX compressor → Streaming codec: calls codec (evidence: `ZSFX/zpipe/zpipe.cpp`)
