+-- Checksums for the decomposition of blocks into even smaller chunks
+-- (variable-sized, but generally ~4 kB, and maximum 64 kB). Chunk boundaries
+-- are determined based on the contents using Rabin fingerprints. These
+-- checksums can be used for computing sub-file incrementals.
+--
+-- Each block stored in block_index may have an entry in the
+-- subblock_signatures table. The signatures field is a binary blob consisting
+-- of a packed sequence of (chunk length [16-bit unsigned, big-endian],
+-- checksum [28 bytes if SHA-224]) tuples that should cover the entire block.
+--
+-- algorithm specifies the method used for computing break points as well as
+-- the hash function used, so that signatures can be discarded if the algorithm
+-- changes. The current algorithm used is 'lbfs-4096/sha224', which specifies
+-- a target 4 kB block size with parameters set to match LBFS, and SHA-224 as
+-- the hash algorithm.
+create table subblock_signatures (
+ blockid integer primary key,
+ algorithm text not null,
+ signatures blob not null
+);
+
+-- Summary of segment utilization for each snapshot.
+create table segment_utilization (
+ snapshotid integer not null,
+ segmentid integer not null,
+
+ -- Estimate for the number of live bytes in data objects: this is capped at
+ -- segments.data_size if all data in the segment is referenced.
+ bytes_referenced integer not null