package bencode

  1. Overview
  2. Docs
Bencode (`.torrent` file format) reader/writer in OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

2.0.tar.gz
md5=80a4d59a246c31df45a42779c777bb28
sha512=687544db98ca47ecd55c8235e751b04df58fd5aba1270dcc93e19629f483f33232ac3779c0e07d0fdb67ea958156113143b0bd3b8640478928b591092d327d12

doc/bencode/Bencode_streaming/index.html

Module Bencode_streamingSource

Non-Blocking IO

Sourcetype bencode = t
Sourcetype 'a sequence = ('a -> unit) -> unit

Serialization (encoding)

Sourcemodule Encode : sig ... end

Pretty printing of values

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

Print the tree itself, not its encoding

Sourceval 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.

Sourcemodule Decode : sig ... end