From 3f25fb9d483d415d78f4945b2863c5d99bca6229 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Sat, 23 Apr 2016 22:43:10 +0200 Subject: update with entries inlined --- meta.dat.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/meta.dat.md b/meta.dat.md index b54af6b..6d51634 100644 --- a/meta.dat.md +++ b/meta.dat.md @@ -5,10 +5,10 @@ Dat uses a simple metadata file called `meta.dat`. The purpose of this file is t # File format ``` -
+
``` -The format is a header followed by many entries. Entry order is based on the indexing determined by the [Flat In-Order Tree](hyperdrive.md#flat-in-order-trees) algorithm we use in Dat. +The format is a header followed by an index of many entries. Entry order is based on the indexing determined by the [Flat In-Order Tree](hyperdrive.md#flat-in-order-trees) algorithm we use in Dat. After the entry index, a concatinated list of entries follows. ### Header format @@ -21,15 +21,16 @@ The header protobuf has this schema: ``` proto message Header { required bytes datLink = 1; - optional bool isSigned = 2; - optional string hashType = 3 [default = "sha256"]; - optional uint32 hashLength = 4 [default = 32]; - optional string signatureType = 5 [default = "ed25519"]; - optional uint32 signatureLength = 6 [default = 64]; + required uint64 entries = 2; + optional bool isSigned = 3; + optional string hashType = 4 [default = "sha256"]; + optional uint32 hashLength = 5 [default = 32]; + optional string signatureType = 6 [default = "ed25519"]; + optional uint32 signatureLength = 7 [default = 64]; } ``` -### Entry format +### Entry index format For non-signed entries: @@ -37,7 +38,7 @@ For non-signed entries: <8-byte-chunk-end> ``` -The 8-byte-chunk-end is an unsigned big endian 64 bitd integer that should be the absolute position in the file for the **end of the chunk**.. +The 8-byte-chunk-end is an unsigned big endian 64 bit integer that should be the absolute position in the file for the **end of the chunk**. For signed entries in live feeds (only applies to even numbered nodes e.g. leaf nodes): -- cgit v1.2.3