# ZsDiff A partial update program. Use [Zstandrard](https://github.com/facebook/zstd). `zsdiff` products a [filename].zdiff file and [filename].zdiff.md5. It compares ALL file hashes from old with new. ``` Usage: zsdiff [OPTIONS] --filename --old --new Options: -f, --filename -c, --compress-level [default: 11] -o, --old -n, --new -h, --help Print help ``` `zspatch` extract files from [filename].zdiff to [dest-dir]. If some file was deleted between old and new, `zspatch` also delete it from [dest-dir]. Flag --hash-check compare computed hash of [filename].zdiff and hash from [filename].zdiff.md5 ``` Usage: zspatch [OPTIONS] --filename --dest-dir Options: -f, --filename -d, --dest-dir -h, --hash-check --help Print help ``` ``` metadata version: uint16 (2 bytes) metadata size: uint32 (4 bytes) n = 6 metadata content: bytes (n;m bytes) m = n+6 (content -> rsa -> zstd (bytes) -> bytes) (m;o) content entry: { size: uint32 (4 bytes) i = 4 j = i + size content: (i;j bytes) } ```