Plebeia.SnapshotSourceThe type for snapshot. Using Seq.t inside
val seq :
node:(Node_type.t -> [< `Hash of Hash.t | `View of Node_type.view ]) ->
Node_type.t ->
tLazy dump of a node and its subnodes
Dump the snapshot of Plebeia tree to file_descr.
To reduce the size of the snapshot, it performs perfect hash-consing.
val save_gen :
Lwt_unix.file_descr ->
int ->
node:(Node_type.t -> [ `Hash of Hash.t | `View of Node_type.view ]) ->
Node_type.t ->
unit Lwt.tGeneralized version of save, specifiable how to handle Disk nodes.
node function is to preprocess each node. It is to, for example, * load Disk * load the hash for hashconsing * replace the node by Hash to stop traversal
Load the snapshot file of Plebeia tree from reader.
The entire tree is node-hash computed.
The entire tree is loaded on memory.
load returns a boolean with the loaded node, which indicates whether the node contains Hash _ or not.
Load the snapshot file of Plebeia tree from t.