Module Kwmbox

module Kwmbox: sig .. end

Mbox parser (Xavier Leroy)

Snarfed from: <http://cristal.inria.fr/~xleroy/software.html#spamoracle>

Hacked by KW 2010-05-13 <http://www.lib.uchicago.edu/keith/>


Author(s): Xavier Leroy, projet Cristal, INRIA Rocquencourt

type t = {
   ic : Pervasives.in_channel;
   zipped : bool;
   mutable start : string;
   buf : Buffer.t;
}
val open_mbox_file : string -> t
val open_mbox_channel : Pervasives.in_channel -> t
val read_msg : t -> string
val close_mbox : t -> unit
val mbox_file_iter : string -> (string -> 'a) -> unit
val mbox_file_fold : ('a -> string -> 'a) -> Pervasives.in_channel -> 'a -> 'a
mbox_file_fold fn inchan acc: fold the function fn over the messages in the mbox file open on inchan with acc as initial accumulator.
val mbox_file_map : (string -> 'a) -> string -> 'a list
mbox_file_map fn filename: map the function fn over the messages in the mbox file filename.
val mbox_channel_iter : Pervasives.in_channel -> (string -> 'a) -> unit
val read_single_msg : Pervasives.in_channel -> string