-writing an index entry containing the offset and length of the data, as
-well as the timestamp, to the index file. Since each index entry is
-fixed length, we can find the index entry simply by multiplying the
-record number we want by the size of the index entry. Upshot:
-constant-time random-access reads and constant-time writes. As an added
-bonus, because we're using append-only files, we get lockless reads.
-
-<p>Tags are handled by a separate set of indices, one per tag. Each
-index record simply stores the user and record number. Tags are
-searched by opening the tag file, reading the last 50 entries or so, and
-then reading all the records listed. Voila, fast tag lookups.
+writing an entry in the index file containing the offset and length of
+the data, as well as the timestamp. Since each index entry is fixed
+length, we can find the index entry simply by multiplying the record
+number we want by the size of the index entry. Upshot: constant-time
+random-access reads and constant-time writes. As an added bonus,
+because we're using append-only files, we get lockless reads.
+
+<table class="bitstructure">
+<tr><th>Tag Structure</th></tr>
+<tr><td class="B32">username (32 bytes)</td></tr>
+<tr><td class="B8">record number (64-bit integer)</td></tr>
+</table>
+
+<p>Tags are handled by a separate set of indices, one per tag. When a
+record is added, it is scanned for tags, then entries are appended to
+each tag index for the tags found. Each index record simply stores the
+user and record number. Tags are searched by opening the tag file,
+reading the last 50 entries or so, and then reading all the records
+listed. Voila, fast tag lookups.