Files
ZsDiff/README.md
2025-10-20 12:34:04 +03:00

45 lines
1.2 KiB
Markdown

# 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 <FILENAME> --old <OLD> --new <NEW>
Options:
-f, --filename <FILENAME>
-c, --compress-level <COMPRESS_LEVEL> [default: 11]
-o, --old <OLD>
-n, --new <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 <FILENAME> --dest-dir <DEST_DIR>
Options:
-f, --filename <FILENAME>
-d, --dest-dir <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)
}
```