Module Trace_common.Io

Derive the IO operations from a file format. Only the write operations are performance sensitive, the read operations are not.

Parameters

module Ff : File_format

Signature

val decode_i32 : int32 Repr.decode_bin
val encode_i32 : int32 Repr.encode_bin
val encode_lheader : Ff.Latest.header Repr.encode_bin
val encode_lrow : Ff.Latest.row Repr.encode_bin
val magic : Magic.t
val read_with_prefix_exn : (string -> int Stdlib.ref -> 'a) -> Stdlib.in_channel -> 'a
val decoded_seq_of_encoded_chan_with_prefixes : 'a Repr.ty -> Stdlib.in_channel -> 'a Seq.t
val open_reader : string -> Ff.Latest.header * Ff.Latest.row Seq.t
type writer = {
  1. path : string;
  2. channel : Stdlib.out_channel;
  3. buffer : Stdlib.Buffer.t;
}
val create_file : string -> Ff.Latest.header -> writer
val append_row : writer -> Ff.Latest.row -> unit
val flush : writer -> unit
val close : writer -> unit
val remove : writer -> unit