package catapult

  1. Overview
  2. Docs

Output

An output is a sink where one can write bytes to encode data to BARE.

val write_byte : char -> unit

Write a single byte.

val write_i16 : int -> unit

Write 2 bytes, in little endian.

val write_i32 : int32 -> unit

Write 4 bytes, in little endian.

val write_i64 : int64 -> unit

Write 8 bytes, in little endian.

val write_exact : bytes -> int -> int -> unit

write_exact b i len writes the slice of length len of b starting at i.

val flush : unit -> unit

Non specified hint that the data may be flushed onto the disk or network. Doing nothing is acceptable when this makes no sense (e.g. when writing to a Buffer.t).