plebeia

Functional storage using Merkle Patricia tree
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library plebeia
Module Plebeia . Snapshot
type snapshot

The type for snapshot. Using Seq.t inside

type t = snapshot
val encoding : int -> t Data_encoding.encoding
val seq : node:( Node_type.t -> [< `Hash of Hash.t | `View of Node_type.view ] ) -> Node_type.t -> t

Lazy 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.t

Generalized 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.

val load' : Hash.Hasher.t -> t -> Node_type.t * bool

Load the snapshot file of Plebeia tree from t.

module Stat : sig ... end

Statistics of the nodes in a snapshot

module Internal : sig ... end