package cdb

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

Module CdbSource

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

Sourceval hash : string -> int32

Utilities

Building a CDB

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

Iterating a CDB

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

Searching

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