[MIRROR] Parser and serializer for Bencode http://wiki.call-cc.org/eggref/4/bencode
Caolan McMahon 53c94d4e27 Release 1.2.2 1 year ago
tests add string->bencode and bencode->string 2 years ago
.gitignore first commit 2 years ago
CHANGELOG Release 1.2.2 1 year ago
README.md use condition of type (exn bencode) for encode/decode exceptions 2 years ago
bencode.meta first commit 2 years ago
bencode.release-info Release 1.2.2 1 year ago
bencode.scm read-bencode: return #f when reading #!eof as the first char from a port 1 year ago
bencode.setup release 1.2.1 2 years ago



A Bencoding parser and serializer for CHICKEN scheme.


;; defaults to current-port if no port provided
(read-bencode [port])
(write-bencode data [port])

Conversion to/from scheme types:

Bencode     | Scheme
string      | string
integer     | number
list        | vector
dictionary  | alist in (symbol . *) form

Attempting to bencode a scheme type not on the above list, or attempting to encode a non-integer number will cause an exception. Condition objects arising from encode/decode errors will have the type (exn bencode).