]> git.proxmox.com Git - pxar.git/commit
format/encoder/decoder: new pxar entry type `Version`
authorChristian Ebner <c.ebner@proxmox.com>
Fri, 22 Mar 2024 11:13:17 +0000 (12:13 +0100)
committerChristian Ebner <c.ebner@proxmox.com>
Wed, 5 Jun 2024 07:24:22 +0000 (09:24 +0200)
commit0983094c87345284ee56ae9eeab47be8375cd730
treed2e3d394bff3ce27555f1a3dc775376388be325e
parentef8b723734de148f22e1288fb7247ca0c678a3a4
format/encoder/decoder: new pxar entry type `Version`

Introduces a new pxar format entry type `Version` and the associated
encoder and decoder methods. The format version entry is only allowed
once, as the first entry of the pxar archive, marked with a
`PXAR_FORMAT_VERSION` header followed by the encoded version number.
If not present, the default format version 1 is assumed as encoding
format for the archive.

The entry allows to early detect incompatibility with an encoded
archive and bail or switch mode based on the encountered version.

The format version entry is not backwards compatible to pxar format
version 1.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
examples/mk-format-hashes.rs
src/accessor/mod.rs
src/decoder/mod.rs
src/encoder/mod.rs
src/format/mod.rs
src/lib.rs
tests/simple/fs.rs