package cdb

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

CDB Implementation. http://cr.yp.to/cdb/cdb.txt

val hash : string -> int32

Utilities

Building a CDB

type cdb_creator = {
  1. table_count : int array;
  2. mutable pointers : (Int32.t * Int32.t) list;
  3. out : out_channel;
}
val open_out : string -> cdb_creator
val cdb_creator_of_out_channel : out_channel -> cdb_creator
val add : cdb_creator -> string -> string -> unit
val close_cdb_out : cdb_creator -> unit

Iterating a CDB

val iter : (string -> string -> (unit -> unit) -> unit -> unit) -> string -> unit

Searching

type cdb_file = {
  1. f : in_channel;
  2. tables : (Int32.t * int) array;
}
val open_cdb_in : string -> cdb_file
val close_cdb_in : cdb_file -> unit
val get_matches : cdb_file -> string -> string Seq.t
val find : cdb_file -> string -> string
OCaml

Innovation. Community. Security.