module Bi_outbuf:sig..end
type t = {
|
mutable o_s : |
(* |
Buffer string
| *) |
|
mutable o_max_len : |
(* |
Same as
String.length s | *) |
|
mutable o_len : |
(* |
Length of the data present in the buffer = current position
in the buffer
| *) |
|
mutable o_offs : |
(* |
Length of data written and flushed out of the buffer.
The total number of bytes written to the buffer
is therefore
o_offs + o_len. | *) |
|
o_init_len : |
(* |
Initial length of the buffer
| *) |
|
o_make_room : |
(* | make_room buf n must provide space for at least the requested
number of bytes n, typically by reallocating a larger buffer
string or by flushing the data to a channel.
This function is only called when there is not enough space for n
bytes. | *) |
|
mutable : |
(* |
Hash table used to map shared objects to positions in the input stream.
| *) |
|
: |
(* |
Initial length of the
o_shared table. | *) |
val really_extend : t -> int -> unitval flush_to_channel : Pervasives.out_channel -> t -> int -> unitval create : ?make_room:(t -> int -> unit) -> ?shrlen:int -> int -> tmake_room function is really_extend.shrlen : initial size of the table used to store shared values.val contents : t -> stringval create_channel_writer : ?len:int -> ?shrlen:int -> Pervasives.out_channel -> t
val flush_channel_writer : t -> unitval create_output_writer : ?len:int ->
?shrlen:int -> < output : string -> int -> int -> int; .. > -> t
val flush_output_writer : t -> unitval extend : t -> int -> unitval alloc : t -> int -> intalloc buf n makes room for n bytes and returns the position
of the first byte in the buffer string buf.s.
It behaves as if n arbitrary bytes were added and it is
the user's responsibility to set them to some meaningful values
by accessing buf.s directly.val add_string : t -> string -> unitval add_substring : t -> string -> int -> int -> unitadd_substring dst src srcpos len copies len bytes from
string src to buffer dst starting from position srcpos.val add_char : t -> char -> unitval add_char2 : t -> char -> char -> unitval add_char4 : t -> char -> char -> char -> char -> unitval unsafe_add_char : t -> char -> unitval clear : t -> unitval reset : t -> unit