package bencode

All checked builds pass
  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

Description

Added to opam-repository:

README

bencode Build Status

Bencode (.torrent file format) reader/writer in OCaml without any external dependencies.

See lib/bencode.mli. Usage is straightforward. There is also a streaming API in modules Bencode_streaming and Bencode_token.

Installation

For a findlib based install

make
make install

Example

In the top level:

#require "bencode"
Bencode.decode (`File_path "test.torrent")

Will return a data structure representing the bencoded form of the following type:

type t =
  | Integer of int
  | String of string
  | List of t list
  | Dict of (string * t) list

Dependencies (2)

  1. ocaml >= "4.02.0"
  2. dune

Dev Dependencies (3)

  1. odoc with-doc
  2. qcheck with-test & >= "0.5.3"
  3. ounit with-test

Optional Dependencies

None

Used by (1)

  1. decoders-bencode >= "0.4.0"

Conflicts

None

Build status

Results of building bencode with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
2.0 (this version) good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure