package bencode

  1. Overview
  2. Docs

Non-Blocking IO

type t = Bencode.t
type bencode = t
type 'a sequence = ('a -> unit) -> unit

Serialization (encoding)

module Encode : sig ... end

Pretty printing of values

val pretty : Format.formatter -> t -> unit

Print the tree itself, not its encoding

val pretty_to_str : t -> string

Print the tree into a string

Deserialization (decoding)

Deserialization is based on the Bencode_token.Decode module. Parsing can be incremental, in which case the input is provided chunk by chunk and the decoder contains the parsing state. Once a B-encoded value has been parsed, other values can still be read.

module Decode : sig ... end