package bencode

  1. Overview
  2. Docs

Module Bencode_streaming.EncodeSource

Sourceval size : bencode -> int

Size needed for serialization, in bytes

Sourceval write_in_string : t -> Bytes.t -> int -> unit

write_in_string v buf o writes the value v in the string, starting at offset o. The portion of the string starting from o must be big enough (ie >= size v)

Sourceval to_buf : Buffer.t -> t -> unit
Sourceval to_string : t -> string
Sourceval to_bytes : t -> Bytes.t
Sourceval to_chan : out_channel -> t -> unit
Sourceval fmt : Format.formatter -> t -> unit

Traverse the Bencode value as a sequence of tokens

Sourceval to_list : bencode -> Bencode_token.t list
Sourceval put : Bencode_token.Encode.t -> t -> unit

Put the whole value on the given token encoder

OCaml

Innovation. Community. Security.