Add uncompressed source flag to zchunk_format.txt
authorJonathan Dieter <jdieter@gmail.com>
Sat, 23 Nov 2019 17:15:53 +0000 (17:15 +0000)
committerStefano Babic <sbabic@denx.de>
Thu, 26 Aug 2021 12:49:39 +0000 (14:49 +0200)
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
zchunk_format.txt

index bc93594ab80be9b1e688a8e8f8bbb7fba5c4bf94..f9237c6ef1979371bd9a1e0bbc810bef252d5455 100644 (file)
@@ -1,3 +1,7 @@
+NOTE: Any flags marked EXPERIMENTAL are still in development and the format, as
+      it applies to those flags, is still in flux.  It is strongly recommended
+      that no public zchunk files be created using EXPERIMENTAL flags
+
 A zchunk file contains two parts, the header and the body.  The header consists
 of four parts:
  * The lead: Everything necessary to validate the header
@@ -68,6 +72,7 @@ Flags
  Current flags are:
   bit 0: File has data streams
   bit 1: File has optional elements
+  bit 2: EXPERIMENTAL: File may be applied against an uncompressed source
 
 Compression type
  This is an integer containing the type of compression used to compress dict and
@@ -116,13 +121,14 @@ The index:
 +===============================+
 
 (Chunk stream will only exist if flag 0 is set to 1)
-[+===================+================+===================+
-[| Chunk stream (ci) | Chunk checksum | Chunk length (ci) |
-[+===================+================+===================+
+EXPERIMENTAL: (Uncompressed chunk checksum will only exist if flag 2 is set to 1)
+[+===================+================+=============================+
+[| Chunk stream (ci) | Chunk checksum | Uncompressed chunk checksum |
+[+===================+================+=============================+
 
-+==========================+]
-| Uncompressed length (ci) |] ...
-+==========================+]
++===================+==========================+]
+| Chunk length (ci) | Uncompressed length (ci) |] ...
++===================+==========================+]
 
 Index size
  This is an integer containing the size of the index.
@@ -168,6 +174,12 @@ Chunk checksum
  This is the checksum of the compressed chunk, used to detect whether any two
  chunks are identical.
 
+EXPERIMENTAL: NOTE: Uncompressed chunk checksum will only exist if flag 2 is set
+                    to 1
+Uncompressed chunk checksum
+ This is the checksum of the uncompressed chunk, used to detect whether a chunk
+ from an uncompressed source is identical to the compressed chunk
+
 Chunk length
  This is an integer containing the length of the chunk.