Module Kv_hash.Nv_map_ss_private

The core implementation is for a map int->int; here we add some additional support to enable a map string->string.

To lookup a particular string key:

To add a key,value:

To delete a key:

NOTE the old value still remains in the values file. Whether this is a problem depends on your application: if you often delete keys there may be substantial overhead in the values file.

val hash : string -> int
type 'int_map t = {
values : Values_file.t;
mutable nv_int_map : 'int_map;
debug : (string, string) Stdlib.Hashtbl.t;
}

A string->string map is a values file and an int->int map. The int->int map is really a map from hash(key) to offset(of value in values file).

module Make_1 : functor (S0 : sig ... end) -> sig ... end
module Make_2 : functor (Raw_bucket : Bucket_intf.BUCKET) -> sig ... end

Putting it all together.

module Make_3 : functor (Raw_bucket : Bucket_intf.BUCKET) -> Nv_map_ss_intf.S

NOTE prefer Make_2 since it provides the Nv_map_ii_ functions

module Nv_map_ss0 : sig ... end