package index

  1. Overview
  2. Docs

Module Private.FanSource

Sourcetype 'a t
Sourceval equal : 'a t -> 'a t -> bool

The equality function for fanouts.

Sourceval v : hash_size:int -> entry_size:int -> int -> [ `Write ] t

v ~hash_size ~entry_size n creates a fan_out for an index with hash_size and entry_size, containing n elements.

Sourceval nb_fans : 'a t -> int

nb_fans t is the number of fans in t.

search t hash is the interval of offsets containing hash, if present.

Sourceval update : [ `Write ] t -> int -> Optint.Int63.t -> unit

update t hash off updates t so that hash is registered to be at offset off.

Sourceval finalize : [ `Write ] t -> [ `Read ] t

Finalizes the update of the fanout. This is mandatory before any search query.

Sourceval exported_size : 'a t -> int

exported_size t is the size of export t. This does not actually compute the encoding of t.

Sourceval export : [ `Read ] t -> string

export t is a string encoded form of t.

Sourceval import : hash_size:int -> string -> [ `Read ] t

import ~hash_size buf decodes buf such that import ~hash_size (export t) = t if t was initially created with ~hash_size.

OCaml

Innovation. Community. Security.