Capnp.CodecsSourceval serialize_fold :
'cap Message.BytesMessage.Message.t ->
compression:compression_t ->
init:'acc ->
f:('acc -> string -> 'acc) ->
'accserialize_fold message ~compression ~init ~f generates an ordered sequence of string fragments corresponding to a Cap'n Proto framed message, encoded using the specified compression method. The return value is the result of folding f across the resulting sequence of fragments.
val serialize_iter :
'cap Message.BytesMessage.Message.t ->
compression:compression_t ->
f:(string -> unit) ->
unitserialize_iter message ~compression ~f generates an ordered sequence of string fragments corresponding to a Cap'n Proto framed message, encoded using the specified compression method. f is applied to each fragment in turn.
serialize ~compression message constructs a string containing the message segments prefixed with the serialization framing header, encoded using the specified compression method.