package containers

  1. Overview
  2. Docs

Basic Bencode decoder/encoder.

See https://en.wikipedia.org/wiki/Bencode .

  • since 3.8
module Str_map : sig ... end
type t =
  1. | Int of int64
  2. | String of string
  3. | List of t list
  4. | Map of t Str_map.t
val equal : t -> t -> bool
val hash : t -> int
val pp_debug : Format.formatter -> t -> unit

Printer for diagnostic/human consumption

val to_string_debug : t -> string
val int : int -> t
val int64 : int64 -> t
val string : string -> t
val list : t list -> t
val map_of_list : (string * t) list -> t
val map : t Str_map.t -> t
module Encode : sig ... end

Encoding

module Decode : sig ... end

Decoding

OCaml

Innovation. Community. Security.