From: Jonathan Dieter Date: Mon, 25 Nov 2019 17:45:31 +0000 (+0000) Subject: Add some clarification as to which sections are flag-dependent X-Git-Tag: archive/raspbian/1.2.1+ds1-1+rpi1^2~7^2~1^2~21^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=dd21c014818012c23331db61a79aad8e95742180;p=zchunk.git Add some clarification as to which sections are flag-dependent Signed-off-by: Jonathan Dieter --- diff --git a/zchunk_format.txt b/zchunk_format.txt index f9237c6..5aa790f 100644 --- a/zchunk_format.txt +++ b/zchunk_format.txt @@ -9,7 +9,7 @@ of four parts: * The index: Details about each chunk * The signatures: Signatures used to sign the zchunk file -Definitions: +Definitions and document conventions: (ci) Compressed (unsigned) integer - An variable length little endian integer where the first seven bits of the number are stored in the first byte, followed by @@ -17,6 +17,9 @@ Definitions: except the final byte must be zero, and the top bit of the final byte must be one, indicating the end of the number. +[#] + Section is only used if flag # is set. + The lead: +-+-+-+-+-+====================+==================+=================+ | ID | Checksum type (ci) | Header size (ci) | Header checksum | @@ -46,18 +49,17 @@ The preface: | Data checksum | Flags (ci) | Compression type (ci ) | +===============+============+========================+ -(Optional elements will only be set if flag 1 is set to 1) -+=============================+ -| Optional element count (ci) | -+=============================+ ++=================================+ +| Optional element count (ci) [1] | ++=================================+ -[+==========================+=================================+ -[| Optional element id (ci) | Optional element data size (ci) | -[+==========================+=================================+ +[+==============================+=====================================+ +[| Optional element id (ci) [1] | Optional element data size (ci) [1] | +[+==============================+=====================================+ -+=======================+] -| Optional element data |] ... -+=======================+] ++===========================+] +| Optional element data [1] |] ... ++===========================+] Data checksum This is the checksum of everything after the header, including the compressed @@ -112,19 +114,17 @@ The index: +=================+==========================+==================+ (Dict stream will only exist if flag 0 is set to 1) -+==================+===============+==================+ -| Dict stream (ci) | Dict checksum | Dict length (ci) | -+==================+===============+==================+ ++======================+===============+==================+ +| Dict stream (ci) [0] | Dict checksum | Dict length (ci) | ++======================+===============+==================+ +===============================+ | Uncompressed dict length (ci) | +===============================+ -(Chunk stream will only exist if flag 0 is set to 1) -EXPERIMENTAL: (Uncompressed chunk checksum will only exist if flag 2 is set to 1) -[+===================+================+=============================+ -[| Chunk stream (ci) | Chunk checksum | Uncompressed chunk checksum | -[+===================+================+=============================+ +[+=======================+================+=================================+ +[| Chunk stream (ci) [0] | Chunk checksum | Uncompressed chunk checksum [2] | +[+=======================+================+=================================+ +===================+==========================+] | Chunk length (ci) | Uncompressed length (ci) |] ...