Document TarMK design
Updated data segments header description
@@ -84,18 +84,18 @@ endian format.
+---------+---------+---------+---------+---------+---------+---------+---------+
| magic bytes: "0aK" | version | reserved
+---------+---------+---------+---------+---------+---------+---------+---------+
- reserved | generation | idcount
+ reserved | generation | segrefcount
+---------+---------+---------+---------+---------+---------+---------+---------+
- idcount | rootcount | reserved
+ segrefcount | reccount | reserved
+---------+---------+---------+---------+---------+---------+---------+---------+
reserved |
+---------+---------+---------+---------+---------+---------+---------+---------+
- | Referenced segment identifiers (idcount x 16 bytes) |
+ | Referenced segment identifiers (segrefcount x 16 bytes) |
| |
| ...... |
| |
+---------+---------+---------+---------+---------+---------+---------+---------+
- | Root record references (rootcount x 9 bytes) |
+ | Record headers (reccount x 9 bytes) |
| |
| ...... +---------+---------+---------+
| | padding (set to 0) |
@@ -110,17 +110,15 @@ The `generation` field indicates the segment's generation wrt. to garbage
collection. This field is used by the garbage collector to determine whether
a segment needs to be retained or can be collected.
-The `idcount` field indicates how many other segments are referenced by
+The `segrefcount` field indicates how many other segments are referenced by
records within this segment. The identifiers of those segments are listed
starting at offset 32 of the segment header. This lookup table is used to
optimize garbage collection and to avoid having to repeat the 16-byte
UUIDs whenever references to records in other segments are made.
-The `rootcount` field indicates the number of root record references that
-follow after the segment identifier lookup table. They identify the types
-and locations of those records within this segment that are not accessible
-by following references in other records within this segment. Each entry in
-that table consists of a record number (4 bytes), a record type (1 byte)
+The `reccount` field indicates the number of records in this segment. Record
+headers for each record follow after the segment identifier lookup table.
+Each header consists of a record number (4 bytes), a record type (1 byte)
and a record offset (4 bytes) from the end of the segment.
## Record numbers and offsets
