From: Jonathan Dieter Date: Mon, 8 Oct 2018 12:42:44 +0000 (+0100) Subject: Add format definition for optional flags X-Git-Tag: archive/raspbian/1.1.9+ds1-1+rpi1~1^2~97 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2019d3647624140c24711359bd2da6e338110b07;p=zchunk.git Add format definition for optional flags Signed-off-by: Jonathan Dieter --- diff --git a/zchunk_format.txt b/zchunk_format.txt index 80703f6..0ab63b8 100644 --- a/zchunk_format.txt +++ b/zchunk_format.txt @@ -38,9 +38,13 @@ Header checksum The preface: -+===============+============+========================+ -| Data checksum | Flags (ci) | Compression type (ci ) | -+===============+============+========================+ ++===============+============+========================+=====================+ +| Data checksum | Flags (ci) | Compression type (ci ) | Optional flags (ci) | ++===============+============+========================+=====================+ + ++==============================+====================+ +| Optional flag data size (ci) | Optional flag data | ++==============================+====================+ Data checksum This is the checksum of everything after the header, including the compressed @@ -54,6 +58,7 @@ Flags Current flags are: bit 0: File has data streams + bit 1: File has optional flags Compression type This is an integer containing the type of compression used to compress dict and @@ -63,6 +68,22 @@ Compression type 0 - Uncompressed 2 - zstd +Optional flags + This is a compressed integer containing a bitmask of optional flags, and will + only be set if flag bit 1 is set. All unused flags MUST be set to 0. If a + decoder sees a flag set that it doesn't recognize, it MUST ignore the flag and + continue as normal. + + Current optional flags are: + - none + +Optional flag data size + This is an integer containing the optional flag data size, and will only be set + if flag bit 1 is set. + +Optional flag data + This contains any data required for optional flags, and will only be set if + flag bit 1 is set. The index: +=================+==========================+==================+