Skip to content

rgrinberg/bencode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

online documentation here

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 int64
  | String of string
  | List of t list
  | Dict of (string * t) list

About

Bencode (.torrent file format) reader/writer in OCaml

Resources

Stars

Watchers

Forks

Packages

No packages published